The problem is that you need to link the Winsock library. I think that the
socket functions on UNIX may have different names and/or parameters, and
definitely the WSAxxxx functions are not in UNIX as these are
Once you add -lwsock32 to the end of your command line your code should
compile and link successfully, but only on Windows.
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.