Link to home
Start Free TrialLog in
Avatar of glt10
glt10

asked on

link error

when i compile my program in visual C++ 6.0
the message chatdlg.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4 occur.
how i solve it
Avatar of jasonclarke
jasonclarke

Assuming you are using VC++, you need to add ws2_32.lib to the list of libraries used in the link settings of your program (Project->Settings, then select the link tab, and then add the library name to the list of libraries.)
>> Assuming you are using VC++
He is.

Jason, that seems like an answer...
ASKER CERTIFIED SOLUTION
Avatar of jasonclarke
jasonclarke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> But recently some wrong or incomplete
>> answers seem to be being accepted just
>> because they are the answer

Yeah, that's a new trend.  It started about 3 years ago.  :-)
Avatar of glt10

ASKER

thank you very much to jasonclarke's for the answer