Hi,
On building a windows service, i m getting the 57 errors and 11 warnings. All the errors are about structure redefinition. Given below are some of them.
:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(147) : warning C4005: 'FD_SET' : macro redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock.h(88) : see previous definition of 'FD_SET'
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(156) : error C2011: 'timeval' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(212) : error C2011: 'hostent' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(225) : error C2011: 'netent' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(232) : error C2011: 'servent' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(244) : error C2011: 'protoent' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(400) : error C2011: 'sockaddr_in' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(410) : error C2011: 'WSAData' : 'struct' type redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(470) : warning C4005: 'SO_DONTLINGER' : macro redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock.h(411) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(527) : warning C4005: 'AF_IPX' : macro redefinition
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock.h(469) : see previous definition of 'AF_IPX'
I have checked in the code, only winsock2.h is included. but from where winsock.h is getting included, i m not able to track. Also, windows.h is not included in the code. if i remove winsock2.h and include winsock.h then errors are thrown for the structures 'WSOVERLAPPED' used in the code.
Any pointers for the same????