----- Original Message ----- From: "David None" <davoooooo@xxxxxxxxxxx> > > Basically, when compiling with cygwin with the following command: > gcc iphdrinc.c -o iphdrinc.exe -lwsock32 > > I get the following error: > "iphdrinc.o(.text+0x820):iphdrinc.c: undefined reference to '_WSASocketA@24' > collect2: ld returned 1 exit status" > Maybe there's an additional lib you also need to link to. In my msvc compiler it looks like that "reference" is "defined" in WS2_32.lib, not wsock32.lib. So, if you have something like a 'libws2_32.a' try lnking to it as well. You could also try searching the libs for the text string "WSASocketA" to find out which additional library file needs to be linked in. Cheers, Rob