Anybody compiled a winsock2 application with Mingw compiler code blocks has built into it? I copied the windows sdk v7.0a from work but it is complaining about no sal.h? I dowloaded one off the web but it was then pointing me towards spinlock/linux.h? That couldnt have been the right one so I chucked it. Now I am back stuck with it complaining about sal.h? I thought the MSVC sdk was self contained?
*EDIT*
Trying to dl visual studios 2010 express (free version). I hate visual studios. <3 code blocks
Winsock2 on Mingw
Re: Winsock2 on Mingw
I have no problems with Winsock2 and C::B (MinGW)... 
nothing else is needed !!!
I simply followed this tutorial from MSDN and it worked out of the box !!!
nothing else is needed !!!
I simply followed this tutorial from MSDN and it worked out of the box !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
Alpha Omega
- Posts: 288
- Joined: Wed Oct 29, 2008 12:07 pm
Re: Winsock2 on Mingw
I have downloaded Visual Studios 2010 express and tested the application compiling the server source Here.
It compiles fine as expected. I then load up the same code in C::B using MinGW32. I am linking to the following paths. Note the visual studios 2010 express comes with an SDK albeit I am not sure if it is complete.
SDK Path
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
Visual Studio VC SDK
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
I set the linking settings in C::B to link to
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\WS2_32.Lib
But it wont compile. Maybe I need to dl the legit SDK and not use the SDK that comes with Visual Studios 2010 Express?
It compiles fine as expected. I then load up the same code in C::B using MinGW32. I am linking to the following paths. Note the visual studios 2010 express comes with an SDK albeit I am not sure if it is complete.
SDK Path
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
Visual Studio VC SDK
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
I set the linking settings in C::B to link to
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\WS2_32.Lib
But it wont compile. Maybe I need to dl the legit SDK and not use the SDK that comes with Visual Studios 2010 Express?
Re: Winsock2 on Mingw
you don't need any other sdk, just the MinGW one !!!
it's all included to C::B...
you can try my test apps...
btw, it's very common that MinGW doesn't compile with the MSVC libs, that's the reason for the gcc libs...
it's all included to C::B...
you can try my test apps...
btw, it's very common that MinGW doesn't compile with the MSVC libs, that's the reason for the gcc libs...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
Alpha Omega
- Posts: 288
- Joined: Wed Oct 29, 2008 12:07 pm
Re: Winsock2 on Mingw
Haha, I just looked in the MingW folder and sure enough it has it all. Maybe I should learn exactly what I can and can't do with mingw before I start dling sdk's.
What a relief I thought I might have to actually use Visual Studios for a minute. .. 