473,729 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unresolved external symbol "void __cdecl __CxxCallUnwind Dtor

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 __CxxCallUnwind Dtor(void (__thiscall*)(v oid *),void *)" (?__CxxCallUnwi ndDtor@@$$J0YAX P6EXPAX@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 3417
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*******@disc ussions.microso ft.com> schrieb im Newsbeitrag
news:52******** *************** ***********@mic rosoft.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 __CxxCallUnwind Dtor(void (__thiscall*)(v oid *),void *)"
(?__CxxCallUnwi ndDtor@@$$J0YAX P6EXPAX@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
2574
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
5639
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 pointer to a siginfo_t as its second argument and a pointer to a ucon- text_t (cast to void *) as its third argument. so we can pass arguments to the signal handler (throught "void*"), but I
188
17386
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
7
2488
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 think this is topical, since it's a C question, but please correct me and apologies if I'm wrong). I suppose that it's this way to allow for "generic" pointer modification, but this implies dereferencing the "void **" pointer to get a "void *"...
2
7621
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 to get around this... The error is: sLibBase error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcmtd.lib(dbgdel.obj) These are 2 the same header files. The first uses <string> and generates the link...
3
20995
by: sandy | last post by:
I cannot figure this out. I have the following code: <code> Private: /****************************************************************************** CreateList
2
2360
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
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9281
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.