VC++: unresolved symbols

Shony
Shony used Ask the Experts™
on

When linking a C++ program with VC++6.0, I get errors like the following.
What is the necessary library ?

sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__socket@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__closesocket@4
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__htons@4
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__inet_addr@4
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__htonl@4
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__bind@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__listen@8
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__gethostbyname@4
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__connect@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__accept@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__getsockname@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__send@16
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__recv@16
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__shutdown@8
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__ioctlsocket@12
sockif.obj : error LNK2001: Nichtaufgeloestes externes Symbol __imp__select@20
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try the Winsock library ... WS2_32.LIB or WSOCK32.LIB  ... u can usually find it in the VC98\lib folder of your visual studio install directory.
ws2_32.lib is the library.  include it with #pragma comment(lib, "ws2_32.lib") or by adding it to your project.  Good luck.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial