Jump to content
  • Advertisement
Sign in to follow this  
ramakrishna

error LNK2001: unresolved external symbol _WSACleanup@0

This topic is 4094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello friends, i am getting these errors while compiling my project.. dcmconv i need it so urgently somebody please help me .. i will be very thankful to u all... Linking... dcuid.obj : error LNK2001: unresolved external symbol _WSACleanup@0 dcuid.obj : error LNK2001: unresolved external symbol _gethostbyname@4 dcuid.obj : error LNK2001: unresolved external symbol _gethostname@8 dcuid.obj : error LNK2001: unresolved external symbol _WSAStartup@8 dcuid.obj : error LNK2001: unresolved external symbol _Netbios@4 Debug/dcmconv.exe : fatal error LNK1120: 5 unresolved externals Error executing link.exe. dcmconv.exe - 6 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
Those linker errors tell you that the linker can't find the implementation of those functions.

You need to link to ws2_32.lib, either in your project settings, or by putting this in a source file:
#pragma comment(lib, "ws2_32.lib")

Although the #pragma is MSVC specific.

Share this post


Link to post
Share on other sites
hello sir,
still i am getting two errors

Linking...
dcuid.obj : error LNK2001: unresolved external symbol _Netbios@4
Debug/dcmconv.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

dcmconv.exe - 2 error(s), 0 warning(s)

not able to rectify this error..

Share this post


Link to post
Share on other sites
From the Docs for Netbios():
Quote:
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Nb30.h.
Library: Use Netapi32.lib.

So you also need to link with Netapi32.lib in the same way as you link to ws2_32.lib.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!