🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem compiling network code

Started by
1 comment, last by shun666 22 years, 4 months ago
Here is the list of messages: Linking... SocketObject.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8 SocketObject.obj : error LNK2001: unresolved external symbol __imp__recv@16 SocketObject.obj : error LNK2001: unresolved external symbol __imp__send@16 SocketObject.obj : error LNK2001: unresolved external symbol __imp__connect@12 SocketObject.obj : error LNK2001: unresolved external symbol __imp__socket@12 SocketObject.obj : error LNK2001: unresolved external symbol __imp__htons@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__WSASetLastError@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__closesocket@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__bind@12 SocketObject.obj : error LNK2001: unresolved external symbol __imp__htonl@4 SocketObject.obj : error LNK2001: unresolved external symbol __imp__listen@8 SocketObject.obj : error LNK2001: unresolved external symbol __imp__accept@12 Debug/ConnectionTest.exe : fatal error LNK1120: 14 unresolved externals Error executing link.exe. ConnectionTest.exe - 15 error(s), 0 warning(s) But I never used the __****** and I don''t see any reference in any of my Header, CPP files? Is this used in the file? Many thanks Hardware: the parts of a computer that can be kicked Software: the parts of a computer that you wnat to kick
Hardware: the parts of a computer that can be kickedSoftware: the parts of a computer that you wnat to kick
Advertisement
you need to link with Ws2_32.lib

the easiest way is to use pragma in your source like this:
#pragma comment(lib, "Ws2_32.lib"

/emptyhead
It''s alive, it''s alive :-)

And one connection program done :-)

Many thanks
Hardware: the parts of a computer that can be kickedSoftware: the parts of a computer that you wnat to kick

This topic is closed to new replies.

Advertisement