473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Unresolved external symbol "void __cdecl __CxxCallUnwindDtor

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
Nov 17 '05 #1
1 3403
Hello Michael,
I have exactly the same problem and found no solution until now.
Do you (or anyone) has solved this issue ??
Ralf
"Michael" <an*******@discussions.microsoft.com> schrieb im Newsbeitrag
news:52**********************************@microsof t.com...
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)
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. 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 once
using namespace System;
namespace Common
{
public __gc class Base
{
public:
Base(void){}
~Base(void){}
};

public __gc class Derived : public Base
{
public:
Derived(void){}
};
}

Best regards,
Michael

Nov 17 '05 #2

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

Similar topics

7
by: Ollej Reemt | last post by:
Hello, I would like to know if there is a difference in c++ between the following two method-declarations: void Method(); and void Method(void);
2
by: Alexandre | last post by:
hello, in sigaction manpage it's written : sa_sigaction also specifies the action to be associated with signum. This function receives the signal number as its first argument, a...
188
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
7
by: sunglo | last post by:
My doubt comes from trying to understand how thread return values work (I know, it's off topic here), and I'm wondering about the meaning of the "void **" parameter that pthread_join expects (I...
2
by: | last post by:
My hear is dropping out of these linker errors of VC++ .NET. :-( I try to create a mixed managed/unmanaged .NET dll to be used for my futur projects, but I always bump in a linker error and no way...
3
by: sandy | last post by:
I cannot figure this out. I have the following code: <code> Private: /****************************************************************************** CreateList
2
by: Virtual_X | last post by:
i am beginner to c++ when i open the file "stdio.h" i have found the line _CRTIMP int __cdecl remove (const char*); and similar lines to it so what's "_CRTIMP" and "__cdecl"
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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...

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.