Static Initializer

Florian Weimer fw@deneb.enyo.de
Mon Oct 18 16:58:00 GMT 2004


* Kartchner Val Civ:

> 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.

Your Ada compiler should something like "adainit", which you should be
able to call from the C++ main function.  (Maybe Verdix Ada supports
only Ada 83, then you have to rely on a vendor-specific mechanism.)



More information about the Gcc-help mailing list