Archive

Posts Tagged ‘sockets’

Fighting Windows Sockets Legacy Troubles

May 14th, 2010 No comments

I came across a really annoying problem while using win32 sockets one of my bigger projects. In short, the VisualC compiler complained about redefinitions of basic Windows socket macros:

C:\sdk\windows\v6.0a\include\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
C:\sdk\windows\v6.0a\include\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(479) : see previous definition of 'AF_MAX'
C:\sdk\windows\v6.0a\include\ws2def.h(163) : warning C4005: 'SO_DONTLINGER' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
C:\sdk\windows\v6.0a\include\ws2def.h(206) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\sdk\windows\v6.0a\include\winsock.h(485) : see declaration of 'sockaddr'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing '}' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing ';' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2059: syntax error : 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(437) : error C2143: syntax error : missing ';' before '}
(...)

Read more…

Performance Optimization WordPress Plugins by W3 EDGE