|
-
July 10th, 2009, 07:34 AM
#1
Linking error LNK2019 while building DLL
Hi,
I am working on one C++ DLL. That dll is internally using some statically build common.lib. When I am building the DLL, I am getting following linking errors:
Creating library Release Standard Heap/paecustomactions.lib and object Release Standard Heap/paecustomactions.exp
common.lib(properocommon.obj) : error LNK2019: unresolved external symbol __imp__mymalloc referenced in function _MIDL_user_allocate@4
common.lib(properocommon.obj) : error LNK2019: unresolved external symbol __imp__myrealloc referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl PROPERO::FormatStringA(char const *,...)" (?FormatStringA@PROPERO@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDZZ)
common.lib(hcheapfix.obj) : error LNK2019: unresolved external symbol __imp__myfree_cond referenced in function _myfree
common.lib(sysconfig.obj) : error LNK2019: unresolved external symbol __imp__mycalloc referenced in function "public: __thiscall PROPERO::Runnable::Runnable(int,int,unsigned short const *)" (??0Runnable@PROPERO@@QAE@HHPBG@Z)
common.lib(stackTrace32.obj) : error LNK2001: unresolved external symbol __imp__mycalloc
../bin/i386/release/paecustomactions.dll : fatal error LNK1120: 4 unresolved externals
Can you please guide me to solve this issue?
Thanks in advance
-
July 10th, 2009, 10:48 PM
#2
Re: Linking error LNK2019 while building DLL
I'm assuming you have a common.h file.
Try including this file as extern "C".
Code:
extern "C"
{
#include "common.h"
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|