Unresolved external symbol "void __cdecl __CxxCallUnwindDtor

G

Guest

Hello dear .Net experts

I have created a Visual C++ class library (.net) project with two classes named Base and Derived wher
Derived inherits from Base. When I add a destructur to base I get the following linker error

Common.obj : error LNK2001: Unresolved external symbol "void __cdecl __CxxCallUnwindDtor(void (__thiscall*)(void *),void *)" (?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z

This does not happen when there is no detructor in Base or when there is a destructor in Bas
but no class derives from Base or when I put this code into a Visual C++ console application (.Net
project. Is it not allowed for classes in libraries to have destructors ? I know about the problems
with destructors and garbage collected objects but I think it would be usefull as a fallback
mechanism to have the destructor cleanup the resources as a last resort
Here is the example code

#pragma onc
using namespace System
namespace Commo

public __gc class Bas

public
Base(void){
~Base(void){
}

public __gc class Derived : public Bas

public
Derived(void){
}


Best regards
Michael
 
R

Ralf Jablonski

Hello Michael,
I have exactly the same problem and found no solution until now.
Do you (or anyone) has solved this issue ??
Ralf


Michael said:
Hello dear .Net experts,

I have created a Visual C++ class library (.net) project with two classes named Base and Derived where
Derived inherits from Base. When I add a destructur to base I get the following linker error:

Common.obj : error LNK2001: Unresolved external symbol "void __cdecl
__CxxCallUnwindDtor(void (__thiscall*)(void *),void *)"
(?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top