?
Solved

link error

Posted on 2000-02-25
5
Medium Priority
?
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

777 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