tags:

views:

200

answers:

4

Hi

I wanna set up a socket on a windows machine. For compilation I am using cygwin with the g++ compiler. For setting up a socket I would need the following library:

WS2_32.lib

which cannot be found on my machine. Is this part of MS SDK or can I download it for free from the web somewhere? If not, is there another way to setup a Socket without winsock.h on Windows?

+3  A: 

Download from the Platform SDK:

Windows® Server 2003 SP1 Platform SDK

or

Windows SDK for Windows Server 2008 and .NET Framework 3.5

Floetic
+2  A: 

If you want to use native Windows sockets, switch to MinGW which is a native Windows C and C++ compiler and comes with all the required libraries.

anon
A: 

For Socket programming, Qt provides a high level library and under L/GPL license.

Matthieu
A: 

You are looking for Beej's Guide to Network Programming: http://www.beej.us/guide/bgnet/

BTW: I am pretty sure MinGW does contain this lib (or something compatible). Are you having problems in linking? This should work "out of the box"

elcuco
He's using cygwin, not MinGW.
anon