Re: Static Initializer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 18, 2004, at 8:49 AM, Kartchner Val Civ OO-ALC/MASHA wrote:
We are using the Verdix Ada compiler and GNU C++ compiler to create an
executable. Each language wants to have it's "main" procedure run so that
it can control startup and initialize static and global variables. But
there can be only one main. I'm hoping that there is a global function that
I can call to initialize the C++ static and globals. I have checked the FAQ
and the manuals, but I haven't found an answer to my question.

Compile an empty main on your system, and then see what it does, then, put that code in your code to initialize C++; or, use symbol remapping features of your linker to change the name main of the C++ main.o file, to cpp_main, and then in Ada, call cpp_main when you want; or, recode gcc's initialization strategy for your platform to not be so brain dead and join the 1980s.


The last one main in fact be the nicest long term solution...  :-)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux