473,491 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

linker error2019

Hi All,
I am trying to call a C function (in static library) from C++ class ( Dll
application).
The C function is declared as follow in the multitheaded library as follows:
#ifdef __cplusplus
extern "C" {

#endif

extern int abc(const char *host, int Port);

#ifdef __cplusplus

}

My Call in C++ ( Multithreaded Dll app)

Class hey

{

public:

int heysee()

{

int a = abc("sdf",234);

return a;

}

};

IXhubService.obj : error LNK2019: unresolved external symbol _abc referenced
in function "public: int __thiscall hey::abc(char const *,int)"
(?heysee@hey@@QAEHPBDH@Z)

Can anyone please tell me how to remove this linking error?

Thanks
Nov 16 '05 #1
2 1038
barkha shah wrote:
IXhubService.obj : error LNK2019: unresolved external symbol _abc
referenced in function "public: int __thiscall hey::abc(char const
*,int)" (?heysee@hey@@QAEHPBDH@Z)

Can anyone please tell me how to remove this linking error?


Link against the LIB.

You can do this either in the linker settings or with:

#pragma comment(lib, "libname.lib")

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
Nov 16 '05 #2
Yah , thanks. I was not able to link the dll with the proper lib and because
of which the definition was not found.

"Jochen Kalmbach" <no********************@holzma.de> wrote in message
news:Xn*********************************@127.0.0.1 ...
barkha shah wrote:
IXhubService.obj : error LNK2019: unresolved external symbol _abc
referenced in function "public: int __thiscall hey::abc(char const
*,int)" (?heysee@hey@@QAEHPBDH@Z)

Can anyone please tell me how to remove this linking error?


Link against the LIB.

You can do this either in the linker settings or with:

#pragma comment(lib, "libname.lib")

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1763
by: Pankaj Bhagat | last post by:
Hi, This is in context with compiler and linker Can someone let me know 1) what is a binder? where is it needed? What does it do in a compiling process? ----------------- 2) When I have a...
12
801
by: Baloff | last post by:
Hello I have this linker error which makes me think that the definition file is not being seen by the linker, this code is taken from "Thinking in C++, 2nd Edition, Volume 1, Annotated Solutions...
1
4957
by: Laszlo | last post by:
Hi all, As a novice I installed PostgreSQL 7.2.1 on Win32 and works, Borland C++Builder Enterprise Suite 5.0 (build 12.34) what works too. I decided to combine these two programs and develop a...
9
2720
by: Felix Kater | last post by:
Hi, if I link my code to other o-files: Does the linker include the whole o-file or does it use the needed functions from that only? Felix
5
6036
by: Pradnyesh Rane | last post by:
Hi, I am encountering the following linker error on VC7. LINK : fatal error LNK1171: unable to load ole32.dll This error is only encountered for the "Debug" configuration. The project...
3
1765
by: Steve Baer | last post by:
I recently read your whitepaper under the "extremely long link times" post and have a question that I was hoping you could answer. My question is based on the following paragraph: Directives...
1
2250
by: Felix | last post by:
After porting a project from VC6 to VC.NET 2003 I have a very strange problem generating link error 1104 for import libraries. I just ported the project and made some small adaptions so it fits...
2
2765
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes...
1
4138
by: Deepath G | last post by:
This is deepath.. I am getting some linker error when i am trying to connect Websphere MQ using Borland C++ Builder 2006 using imqi.hpp on windows. Error Message ----------------------- ...
0
6978
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
7154
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
7190
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...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.