Compiling, missing socket.h - help

Killerkris

Distinguished
Dec 31, 2007
3
0
18,510
I know this is probably not the best place to ask, but i am not a member of many forums. Basically i am trying to compile a program on windows 2000, i have tried Microsoft Visual C++ and also versions of gcc ported to windows, but all are saying missing socket.h - i know this is a libary, but where do i download it from, or is this a linux only libary?

thanks

KK

A Life, where can i download one of those from?
 

FatBurger

Distinguished
Jun 1, 2001
196
0
18,630
You might've just forgotten to include it, but you have it. Have you searched your hard drive? If not, just do a google search for it, I can almost always find the file for download if I search for the filename.

<font color=blue>Hi mom!</font color=blue>
 

jlanka

Distinguished
Mar 16, 2001
2
0
18,510
on Microsoft, it's called winsock.h or winsock2.h

<i>It's always the one thing you never suspected.</i>
 

Killerkris

Distinguished
Dec 31, 2007
3
0
18,510
thats great thanks, can you tell me where i can find a list of the linux/unix libaries and then the windows ones, as now there are lots more unfortunately, thanks again

now i am looking for:
sys/wait.h
sys/ioctl.h
netinet/in.h
netdb.h Code.h
arpa/inet.h

A Life, where can i download one of those from?
 

jlanka

Distinguished
Mar 16, 2001
2
0
18,510
OK, WIN32 handles waiting on a thread differently from Unix. For instance, instead of wait you would use WaitForSingleObject (declared in winbase.h) - look at that function in the MSDN help library.

ioctl.h -> winsock2.h
in.h -> winsock2.h
inet.h -> winsock2.h
netdb.h -> winsock2.h
code.h -> ??



<i>It's always the one thing you never suspected.</i>