Andi
Andi

Reputation:

C++ Socket programming Windows

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?

Upvotes: 2

Views: 1411

Answers (4)

elcuco
elcuco

Reputation: 9208

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"

Upvotes: 1

Matthieu
Matthieu

Reputation: 2761

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

Upvotes: 1

anon
anon

Reputation:

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.

Upvotes: 2

Related Questions