|
From: KJK::Hyperion <no...@li...> - 2002-05-19 18:26:16
|
At 02.09 19/05/2002, you wrote: >>>Would not suprise me if there is a switch to turn this off. >>AFAIK, no. I've examined the whole output of gcc -v --help, found nothing >>useful >You should check the info page for gcc to be sure there is not a flag. Negative. I had to explore the internals manual. I found out that, for executable formats not supporting initialization sections, __main calls the constructors for static C++ objects at startup, and the destructors before shutdown. I knew of this requirement for static CRTs (I read an article of Pietrek on MSDN Magazine on rolling your own CRT), but GCC is the only compiler I know of that inserts an explicit call to the initializator, instead of simply doing the initialization before calling main() >Also, just name your entry point something besides main perhaps? That's what I did. But this doesn't make the problem go away: sometime in the future, we'll need to provide a static CRT for POSIX+ programs. I'll try to add -lgcc, like the documents suggest, and implement atexit() in psxdll. That should do the trick >And by the way, I've had my share of problems with Borland's C compiler. We're not talking about Borland C |