Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error LNK2001: unresolved external symbol __imp__ntohl@4

176 views
Skip to first unread message

karthikbalaguru

unread,
Dec 26, 2008, 4:41:53 AM12/26/08
to
Hi,
I am trying to check an opensource code.
But, I get the below error -
error LNK2001: unresolved external symbol __imp__ntohl@4

How to resolve the above problem ? Any ideas ?

I use Windows XP and Visual C++ 6.0.

Thx in advans,
Karthik Balaguru

Alex Blekhman

unread,
Dec 26, 2008, 4:54:43 AM12/26/08
to
"karthikbalaguru" wrote:
> Hi,
> I am trying to check an opensource code.
> But, I get the below error -
> error LNK2001: unresolved external symbol __imp__ntohl@4
>
> How to resolve the above problem ? Any ideas ?
>
> I use Windows XP and Visual C++ 6.0.

You should link with Ws2_32.lib library. Read in MSDN about
`ntohl' function.

Alex


karthikbalaguru

unread,
Dec 26, 2008, 5:58:45 AM12/26/08
to

Thx for that info.
I added WS2_32.LIB at the end of 'Object/Library Modules' in 'Input
Property Page' of 'Project Settings'.
It does not show that error now.

Got some good links too -
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c/
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvc/thread/b741887e-e37c-404d-9c22-ef4dee4e6fd2/

Thx,
Karthik Balaguru

0 new messages