This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Static Initializer
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Kartchner Val Civ OO-ALC/MASHA <Val dot Kartchner at HILL dot af dot mil>
- Cc: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 18 Oct 2004 18:58:45 +0200
- Subject: Re: Static Initializer
- References: <28D2D04B2E962F4CA8EB97827626487236B571@fskrsm42.hill.af.mil>
* 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.)