unresolved external __cdecl __CxxCallUnwindDtor

E

edx

Hi,

compiling my class library with Managed C++, I get this:



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



From searching the internet, I already know that it *should* be fixable by
placing #undef DEBUG_CTRS in the source or header file or whereever, but
this doesn't seem to help the problem in my case.

I do have some classes derived from IDisposable (also from Form.Window which
is derived from IDisposable, I guess).

How can I fix this issue?

Thanks a lot,

Felix Arends
 
T

Tanveer Gani [MSFT]

--------------------
From: "edx" <[email protected]>
Subject: unresolved external __cdecl __CxxCallUnwindDtor
Date: Wed, 3 Sep 2003 22:48:37 +0200
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.languages.vc
NNTP-Posting-Host: pd9eaa3cd.dip.t-dialin.net 217.234.163.205
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:27896
X-Tomcat-NG: microsoft.public.dotnet.languages.vc

Hi,

compiling my class library with Managed C++, I get this:



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



From searching the internet, I already know that it *should* be fixable by
placing #undef DEBUG_CTRS in the source or header file or whereever, but
this doesn't seem to help the problem in my case.

I do have some classes derived from IDisposable (also from Form.Window which
is derived from IDisposable, I guess).

How can I fix this issue?

Thanks a lot,

Felix Arends

Hi Felix,

You can fix this by explicitly linking to the CRT library (msvcrt.lib or
msvcrtd.lib, depending on your build flavour). The other option is to set
exception handling to "no" if your code doesn't need exception unwinding,
i.e., destruction of unmanaged C++ objects as the stack unwinds.

This thread may be helpful too:

http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=137270
 

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