PDA

View Full Version : WinSock2


Extrawurst
11-01-2003, 05:59 AM
hi,
my problem is, that immediatly after including the "WinSock2.h" hundrets of these errors appear!->


h:\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinSock2.h(254 :
error C2375: 'WSAAsyncSelect' : redefinition;
different linkage
h:\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinSock.h(943) : see
declaration of 'WSAAsyncSelect'


When i included the header in my last console-project i diddnt get that error! it seems that it is in conflict with a previously included "Winsock.h", but i didnt ever included ist!
Please help me!

Extrawurst
11-01-2003, 12:38 PM
okay, i solved it!
so you know for the future who didn't, the Problem was that you have to include "Winsock2.h" before including "Windows.h", beecause the "WinSock.h" is included with that, the other way instead of changing the including-order, you can define WIN_LEAN_AND_MEAN....