This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Static Initializer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]