[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

link error

Posted on 2000-02-25
5
Medium Priority
?
195 Views
Last Modified: 2010-04-02
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
0
Comment
Question by:glt10
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:jasonclarke
ID: 2557239
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.)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2557808
>> Assuming you are using VC++
He is.

Jason, that seems like an answer...
0
 
LVL 9

Accepted Solution

by:
jasonclarke earned 400 total points
ID: 2557915
Se above comment.


> that seems like an answer...
I suppose so, I have taken to not answering anything recently, to allow so as not to cut off the question.  

But recently some wrong or incomplete answers seem to be being accepted just because they are the answer, which is kind of frustrating when you put in a lot of work, as you of all people must know...
0
 
LVL 22

Expert Comment

by:nietod
ID: 2557982
>> 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.  :-)
0
 

Author Comment

by:glt10
ID: 2560124
thank you very much to jasonclarke's for the answer
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question