www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/05/21:58:48

Message-Id: <3.0.5.32.19990106002728.00800800@200.252.238.1>
X-Sender: thiagofga AT 200 DOT 252 DOT 238 DOT 1 (Unverified)
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32)
Date: Wed, 06 Jan 1999 00:27:28 -0200
To: djgpp AT delorie DOT com
From: "Thiago F.G. Albuquerque" <thiagofga AT ambr DOT com DOT br>
Subject: Re: __ctr0_glob_function() doesn't get called in C++
In-Reply-To: <Pine.SUN.3.91.990103111002.12860Q-100000@is>
References: <76m846$qe6$1 AT news DOT luth DOT se>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

>On 2 Jan 1999, Martin Str|mberg wrote:
>
>> I'm no expert on C++, but it seems you have to declare
>> __crt0_glob_function() as "extern C" (or whatever it's called - that's
>> how small a C++ expert I am) or put it in a file compiled as C not
>> C++.
>
>That is *exactly* the solution.  Without the "extern C" declaration, the 
>compiler mangles the name of __crt0_glob_function into something else, 
>and so the linker doesn't replace the library function with your empty 
>one (because the linker sees a different name).

You are right. Thanks for the help!

Thiago

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019