R
Ralf Jablonski
Hello,
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:
Test.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 Base
but no class derives from Base or when I put this code into a Visual C++
console application (.Net)
project.
If I disable exception handling for the compiler (remove /EHsc) then the
assembly is created.
Is exception handling not allowed with inheritance in C++ ?
Here is the example code:
#pragma once
using namespace System;
namespace Test
{
public __gc class Base
{
public:
Base(void){}
~Base(void){}
};
public __gc class Derived : public Base
{
public:
Derived(void){}
~Derived(void){}
};
}
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:
Test.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 Base
but no class derives from Base or when I put this code into a Visual C++
console application (.Net)
project.
If I disable exception handling for the compiler (remove /EHsc) then the
assembly is created.
Is exception handling not allowed with inheritance in C++ ?
Here is the example code:
#pragma once
using namespace System;
namespace Test
{
public __gc class Base
{
public:
Base(void){}
~Base(void){}
};
public __gc class Derived : public Base
{
public:
Derived(void){}
~Derived(void){}
};
}