Sign in to follow this  
Android_s

winsock2.h and windows.h colliding!?

Recommended Posts

Hi! This has bugged me long enough. It seems winsock2.h and windows.h "collides" with each other. If i include them both i get these type of errors (a LOT more though!) c:\program\microsoft visual studio\vc98\include\winsock2.h(573) : warning C4005: 'SOMAXCONN' : macro redefinition c:\program\microsoft visual studio\vc98\include\winsock.h(533) : see previous definition of 'SOMAXCONN' c:\program\microsoft visual studio\vc98\include\winsock2.h(598) : warning C4005: 'FD_READ' : macro redefinition c:\program\microsoft visual studio\vc98\include\winsock.h(551) : see previous definition of 'FD_READ' c:\program\microsoft visual studio\vc98\include\winsock2.h(601) : warning C4005: 'FD_WRITE' : macro redefinition c:\program\microsoft visual studio\vc98\include\winsock.h(552) : see previous definition of 'FD_WRITE' Now if i skip including winsock2.h i don't get those errors, but rather obious, the actual networking code lying in separate .cpp files won't work...<sighs deeply> Is there some #define or setting i have missed or WHAT am i doing wrong!?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this