Solved

link error

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now