www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/03/04:14:15

Date: Sun, 3 Jan 1999 11:11:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: __ctr0_glob_function() doesn't get called in C++
In-Reply-To: <76m846$qe6$1@news.luth.se>
Message-ID: <Pine.SUN.3.91.990103111002.12860Q-100000@is>
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).

- Raw text -


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