473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Getting Linking error in Visual C++

Hi all,

I am trying to compile a C++ code which i have written for creating a socket and doing simple linking with a server in VC++. The code compiles fine. But while building the code(using the Build command) it throws the following error.

--------------------Configuration: domain - Win32 Debug--------------------
Linking...
sockets.obj : error LNK2001: unresolved external symbol _getaddrinfo@16
Debug/domain.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

domain.exe - 2 error(s), 0 warning(s)

Anybody has any knowledge about which .lib file to be added to remove the error or any other suggestion to remove the error......please share it with me.

Thanks,
Bishnu
Jan 25 '07 #1
3 1971
Banfa
9,065 Expert Mod 8TB
I do not see any such function as getaddrinfo in my Windows Sockets implementation.

Either it is a function you have forgotten to implement or you meant a different function.
Jan 25 '07 #2
Motoma
3,237 Expert 2GB
Make sure you are linking against Ws2_32.dll
Jan 25 '07 #3
Thank you very much for your response. I got it fixed. You have to include Wspiapi.h header file. It solves the problem as it has these two functions implemented.
Jan 29 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: DJ.precario | last post by:
Hi everyone, I am having a linking problem, and I'd appreciate any help with this. The code showing the problem: class base { public: virtual void f(int); };
2
by: | last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled within Visual Studio .NET 2003). Am trying to link simple c++ code to fortran dlls created in Compaq Visual Fortran (v6.1)....
7
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with...
6
by: Uli | last post by:
Hello, I'm trying to use a DLL (by static linking) which was compiled with Borland C++Builder (BCB) in Visual C++ (Visual-Studio 2003). All functions are declared with the directive 'extern...
0
by: Usman | last post by:
Hi I've a COM compiled in visual studio 6 that is internally using zlib library (an opensource library for compression). I've no problem compiling that code. But when I moved to visual...
10
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using...
0
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when...
0
by: dotyet | last post by:
Hi Everyone, I am trying to build a DB2 UDB UDF which can perform regex over the table data. The user defined function will call an external .dll file to do the task. I am referring to the...
1
by: Benny | last post by:
I have built a wrapper class as a dll in Visual Studio 2005 using Visual C++ .Net. When I include the dll in another project, Project B, on my machine, it works. When I package Project B and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.