Solved

link error

Posted on 2000-02-25
5
191 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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

707 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