Click here to Skip to main content
16,011,647 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SNMP informs (assured-delivery traps?) Pin
BambooMoon4-Nov-05 8:15
BambooMoon4-Nov-05 8:15 
Questionsubversion API Pin
Anehl4-Nov-05 4:08
Anehl4-Nov-05 4:08 
AnswerRe: subversion API Pin
Chris Losinger4-Nov-05 5:20
professionalChris Losinger4-Nov-05 5:20 
GeneralRe: subversion API Pin
Anehl6-Nov-05 21:58
Anehl6-Nov-05 21:58 
QuestionHow to get & send data from USB Pin
vikas amin4-Nov-05 3:25
vikas amin4-Nov-05 3:25 
AnswerRe: How to get & send data from USB Pin
Anehl4-Nov-05 4:27
Anehl4-Nov-05 4:27 
GeneralRe: How to get & send data from USB Pin
vikas amin4-Nov-05 19:14
vikas amin4-Nov-05 19:14 
Questionlinker errors porting from .NET 1.1 to 2.0 Pin
chucker754-Nov-05 2:28
chucker754-Nov-05 2:28 
Hi Folks,

I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this
worked fine. When moving to .NET 2.0 I get a couple of unresolved externals /
linker errors:

Error 16 error LNK2028: unresolved token (0A000007) "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public:
virtual __thiscall std::logic_error::~logic_error(void)"
(??1logic_error@std@@$$FUAE@XZ) Parameter.obj
Error 17 error LNK2028: unresolved token (0A000007) "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public:
__thiscall std::bad_alloc::bad_alloc(char const *)"
(??0bad_alloc@std@@$$FQAE@PBD@Z) Imagic.obj
Error 18 error LNK2028: unresolved token (0A000008) "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public:
virtual __thiscall std::logic_error::~logic_error(void)"
(??1logic_error@std@@$$FUAE@XZ) Align2D.obj
Error 19 error LNK2028: unresolved token (0A000347) "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) referenced in function "public: virtual void
* __thiscall std::logic_error::`vector deleting destructor'(unsigned int)"
(??_Elogic_error@std@@$$FUAEPAXI@Z) Parameter.obj
Error 20 error LNK2028: unresolved token (0A0003D3) "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) referenced in function "public: virtual void
* __thiscall std::bad_alloc::`vector deleting destructor'(unsigned int)"
(??_Ebad_alloc@std@@$$FUAEPAXI@Z) Imagic.obj
Error 21 error LNK2028: unresolved token (0A000358) "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) referenced in function "public: virtual void
* __thiscall std::logic_error::`vector deleting destructor'(unsigned int)"
(??_Elogic_error@std@@$$FUAEPAXI@Z) Align2D.obj
Error 22 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) Align2D.obj
Error 23 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 24 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) Imagic.obj
Error 25 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) Parameter.obj
Error 26 error LNK2019: unresolved external symbol "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public:
virtual __thiscall std::logic_error::~logic_error(void)"
(??1logic_error@std@@$$FUAE@XZ) Align2D.obj
Error 27 error LNK2001: unresolved external symbol "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) Imagic.obj
Error 28 error LNK2001: unresolved external symbol "extern "C" void
__clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"
(?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) Parameter.obj
Error 29 error LNK2019: unresolved external symbol "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) referenced in function "public: virtual void
* __thiscall std::logic_error::`vector deleting destructor'(unsigned int)"
(??_Elogic_error@std@@$$FUAEPAXI@Z) Align2D.obj
Error 30 error LNK2001: unresolved external symbol "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) Imagic.obj
Error 31 error LNK2001: unresolved external symbol "void __clrcall `eh
vector destructor iterator'(void *,unsigned int,int,void (__clrcall*)(void
*))" (??_M@$$FYMXPAXIHP6MX0@Z@Z) Parameter.obj
Error 32 fatal error LNK1120: 9 unresolved externals Debug\empDll.dll

In my .NET 1.1 Project I had to make the following Linker Settings to build
the DLL:

1.) Additional Dependencies: mscoree.lib msvcrt.lib (or msvcrtd.lib for
debug version) mystaticlib.lib

2.) Ignore Specific Library: nochkclr.obj

3.) Force Symbol Reference: __DllMainCRTStartup@12

In my Wrapper Classes I had to add the following:

#using <mscorlib.dll>

using namespace System;
using namespace System::Runtime::InteropServices;

This does not work any longer with the new Visual Studio and the new .NET
Framework.

The only article that I was able to find on this subject:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/TransGuide.asp

Doesn´t mention Linker settings at all.

Could anybody please help me or tell me where to go for further reading?
Thanks in Advance for your efforts.

Chucker
AnswerRe: linker errors porting from .NET 1.1 to 2.0 Pin
S. Senthil Kumar4-Nov-05 2:50
S. Senthil Kumar4-Nov-05 2:50 
GeneralRe: linker errors porting from .NET 1.1 to 2.0 Pin
chucker754-Nov-05 3:57
chucker754-Nov-05 3:57 
GeneralRe: linker errors porting from .NET 1.1 to 2.0 Pin
chucker754-Nov-05 4:08
chucker754-Nov-05 4:08 
GeneralRe: linker errors porting from .NET 1.1 to 2.0 Pin
S. Senthil Kumar4-Nov-05 4:10
S. Senthil Kumar4-Nov-05 4:10 
GeneralRe: linker errors porting from .NET 1.1 to 2.0 Pin
chucker754-Nov-05 4:13
chucker754-Nov-05 4:13 
Question_bstr_t help needed Pin
ita_cas4-Nov-05 2:28
ita_cas4-Nov-05 2:28 
AnswerRe: _bstr_t help needed Pin
S. Senthil Kumar4-Nov-05 2:45
S. Senthil Kumar4-Nov-05 2:45 
AnswerRe: _bstr_t help needed Pin
Michael Dunn4-Nov-05 18:49
sitebuilderMichael Dunn4-Nov-05 18:49 
Questionwhat is a smart pointer Pin
vikas amin4-Nov-05 2:16
vikas amin4-Nov-05 2:16 
AnswerRe: what is a smart pointer Pin
Maximilien4-Nov-05 2:18
Maximilien4-Nov-05 2:18 
GeneralRe: what is a smart pointer Pin
vikas amin4-Nov-05 2:23
vikas amin4-Nov-05 2:23 
AnswerRe: what is a smart pointer Pin
toxcct4-Nov-05 3:09
toxcct4-Nov-05 3:09 
AnswerRe: what is a smart pointer Pin
qfegd4-Nov-05 3:28
qfegd4-Nov-05 3:28 
AnswerRe: what is a smart pointer Pin
Graham Shanks4-Nov-05 3:37
Graham Shanks4-Nov-05 3:37 
GeneralRe: what is a smart pointer Pin
toxcct4-Nov-05 3:44
toxcct4-Nov-05 3:44 
GeneralRe: what is a smart pointer Pin
Graham Shanks4-Nov-05 3:49
Graham Shanks4-Nov-05 3:49 
GeneralRe: what is a smart pointer Pin
ThatsAlok6-Nov-05 21:06
ThatsAlok6-Nov-05 21:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.