I'm trying to compile code made in VS 6.0 in VS2003 .NET and I get the following errors
My program generates errors along the lines of
error C2011: 'fd_set' : 'struct' type redefinition
and tons of other ones like it. So I put under c++/preprocessor/preproces
sor definitions _WINSOCKAPI_, and that fixed one of my programs before but not this time. Then I tried
#define WIN32_LEAN_AND_MEAN before windows.h and that didn't work either.
When I use
#ifndef _WINSOCK2API_
#define _WINSOCK2API_
#define _WINSOCKAPI_
#endif
It cuts my errors in half but then they read something like
WS2tcpip.h(28): error C2011: 'ip_mreq' : 'struct' type redefinition
Now all of the errors are in the ws2tcpip.h file now. any ideas why this is so
Start Free Trial