Solved

link error

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Best book to learn C++ 4 96
Embarcadero C++ builder XE10.1 Berlin TRegistry declaration 1 57
find Speed using GPS latitude & longitude 4 154
I could not set window to top 4 62
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

737 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