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" Subject: Re: __ctr0_glob_function() doesn't get called in C++ In-Reply-To: References: <76m846$qe6$1 AT news DOT luth DOT se> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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