Overview
Features
Download
Documentation
Community
Add-Ons & Services

netssl lib build error,pls help

A general discussion forum.

netssl lib build error,pls help

Postby jackyu » 20 Oct 2010, 08:56

when i build netssl lib,some errors occur. why? pls help. i use VS2008+windows2003 server+penSSL-0_9_8o
AcceptCertificateHandler.cpp
CertificateHandlerFactory.cpp
CertificateHandlerFactoryMgr.cpp
ConsoleCertificateHandler.cpp
Context.cpp
InvalidCertificateHandler.cpp
KeyConsoleHandler.cpp
KeyFileHandler.cpp
PrivateKeyFactory.cpp
PrivateKeyFactoryMgr.cpp
PrivateKeyPassphraseHandler.cpp
SSLException.cpp
SSLManager.cpp
Utility.cpp
VerificationErrorArgs.cpp
X509Certificate.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(91) : warning C4005: “AF_IPX”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(460) : 参见“AF_IPX”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(116) : warning C4005: “AF_MAX”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(479) : 参见“AF_MAX”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(163) : warning C4005: “SO_DONTLINGER”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(402) : 参见“SO_DONTLINGER”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(206) : error C2011: “sockaddr”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(485) : 参见“sockaddr”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(384) : error C2143: 语法错误 : 缺少“}”(在“常量”的前面)
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C2143: 语法错误 : 缺少“;”(在“}”的前面)
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(518) : warning C4005: “IN_CLASSA”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(287) : 参见“IN_CLASSA”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(524) : warning C4005: “IN_CLASSB”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(293) : 参见“IN_CLASSB”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(530) : warning C4005: “IN_CLASSC”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(299) : 参见“IN_CLASSC”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(541) : warning C4005: “INADDR_ANY”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(304) : 参见“INADDR_ANY”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(543) : warning C4005: “INADDR_BROADCAST”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(306) : 参见“INADDR_BROADCAST”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(577) : error C2011: “sockaddr_in”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(312) : 参见“sockaddr_in”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(132) : error C2011: “fd_set”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(68) : 参见“fd_set”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(167) : warning C4005: “FD_SET”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(102) : 参见“FD_SET”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(176) : error C2011: “timeval”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(111) : 参见“timeval”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(232) : error C2011: “hostent”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(167) : 参见“hostent”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(245) : error C2011: “netent”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(180) : 参见“netent”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(252) : error C2011: “servent”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(187) : 参见“servent”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(264) : error C2011: “protoent”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(199) : 参见“protoent”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(360) : error C2011: “WSAData”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(322) : 参见“WSAData”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(458) : error C2011: “sockproto”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(494) : 参见“sockproto”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(500) : error C2011: “linger”: “struct”类型重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(531) : 参见“linger”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(513) : warning C4005: “SOMAXCONN”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(544) : 参见“SOMAXCONN”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(542) : warning C4005: “FD_READ”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(562) : 参见“FD_READ”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(545) : warning C4005: “FD_WRITE”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(563) : 参见“FD_WRITE”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(548) : warning C4005: “FD_OOB”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(564) : 参见“FD_OOB”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(551) : warning C4005: “FD_ACCEPT”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(565) : 参见“FD_ACCEPT”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(554) : warning C4005: “FD_CONNECT”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(566) : 参见“FD_CONNECT”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(557) : warning C4005: “FD_CLOSE”: 宏重定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(567) : 参见“FD_CLOSE”的前一个定义
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1527) : error C2375: “accept”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(735) : 参见“accept”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1548) : error C2375: “bind”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(740) : 参见“bind”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1567) : error C2375: “closesocket”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(745) : 参见“closesocket”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1586) : error C2375: “connect”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(747) : 参见“connect”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1607) : error C2375: “ioctlsocket”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(752) : 参见“ioctlsocket”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1628) : error C2375: “getpeername”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(757) : 参见“getpeername”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1649) : error C2375: “getsockname”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(762) : 参见“getsockname”的声明
c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1672) : error C2375: “getsockopt”: 重定义;不同的链接
c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(767) : 参见“getsockopt”的声明
jackyu
 
Posts: 1
Joined: 20 Oct 2010, 08:48

Re: netssl lib build error,pls help

Postby cwahlgren » 09 Nov 2010, 21:00

Hi,

I discovered that myself some days ago. This is due to that later versions of OpenSSL (at least 0.9.8o, 1.0.0.a) has added an include of <winsock.h> in include\openssl\dtls1.h, which will collide with Poco'c include of winsock2.h. You can solve that temporarily by changing <winsock.h> to <winsock2.h> in dtls1.h until OpenSSL has released a fix (at least that's my interpretation of what you can read on the internet about OpenSSL and their recently added include of winsock.h instead of winsock2.h).


Best Regards,
C
cwahlgren
 
Posts: 1
Joined: 09 Nov 2010, 20:27

Re: netssl lib build error,pls help

Postby guenter » 10 Nov 2010, 21:58

You can also upgrade to the 1.3.7 branch, which works with newer OpenSSL versions (including 1.0).
guenter
 
Posts: 1165
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests