Date: Sun, 3 Jan 1999 11:11:45 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Str|mberg 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: 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).