Overview
Features
Download
Documentation
Community
Add-Ons & Services

Net_OpenSSL VC2010 build error

Please post support and help requests here.

Net_OpenSSL VC2010 build error

Postby rvs » 11 May 2010, 12:20

Good day,
I tried to build Net_OpenSSL lib using Visual Studio 2010 and got some
errors:

Error 4 error C2011: 'sockaddr' : 'struct' type redefinition
c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h
212 1 NetSSL_OpenSSL
Error 5 error C2059: syntax error : 'constant' c:\program
files\microsoft sdks\windows\v7.0a\include\ws2def.h 390 1
NetSSL_OpenSSL
Error 6 error C2143: syntax error : missing ';' before '}'
c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h
443 1 NetSSL_OpenSSL
Error 7 error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int c:\program files\microsoft
sdks\windows\v7.0a\include\ws2def.h 443 1 NetSSL_OpenSSL
Error 8 error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int c:\program files\microsoft
sdks\windows\v7.0a\include\ws2def.h 443 1 NetSSL_OpenSSL

Version OpenSLL is 1.0

Can anybody help me?
rvs
 
Posts: 5
Joined: 11 May 2010, 12:09

Re: Net_OpenSSL VC2010 build error

Postby retf » 11 Jun 2010, 00:29

to me this work:

search.php
retf
 
Posts: 58
Joined: 19 May 2010, 14:32

Re: Net_OpenSSL VC2010 build error

Postby retf » 11 Jun 2010, 00:33

retf
 
Posts: 58
Joined: 19 May 2010, 14:32

Re: Net_OpenSSL VC2010 build error

Postby mustafa » 16 Jun 2010, 12:24

Hi,

I have same problem.

I mentioned here:
viewtopic.php?f=12&t=3126

NetSSL_OpenSSL package didn't compile.

But I am trying OpenSSL 1.0 binary release so I don't have choice to recompile OpenSSL with <winsock2.h> header file.

Could you please give any solution?

Regards
mustafa
 
Posts: 2
Joined: 02 Jun 2010, 20:30

Re: Net_OpenSSL VC2010 build error

Postby guenter » 23 Jul 2010, 12:55

The fix is to #include "Poco/Net/SocketDefs" in the following two
NetSSL_OpenSSL header files:

Context.h: immediately after #include "Poco/Net/NetSSL.h"
X509Certificate.h: also immediately after #include "Poco/Net/NetSSL.h"

This will include <winsock2.h> before any of the openssl headers are
included.
The dtls1.h header in openssl #includes <winsock.h>; if <winsock2.h>
has already
been included, #include <winsock.h> has no effect, thus fixing the
issue.

The fix is in 1.3.7 SVN (rev. 1384).
guenter
 
Posts: 1110
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Net_OpenSSL VC2010 build error

Postby CryptoKnight » 08 Jan 2014, 21:45

FYI, these same kind of errors show up if you

#include "Poco/Crypto/X509Certificate.h"

instead of

#include "Poco/Net/X509Certificate.h"

in a project that uses Net_OpenSSL. Could probably be fixed the same way, if you're willing to create a dependency between Crypto and Net.
CryptoKnight
 
Posts: 2
Joined: 07 Jan 2014, 23:32


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron