riedl@cs.purdue.EDU (John T Riedl) (11/21/89)
I need to call a g++ routine from a C routine. I'm having trouble
getting the constructors for external objects called correctly. It
works fine for g++-1.35 using the g++ linker, since this linker
manages initialization through symbol "__start" defined in crt0+.o.
Under g++-1.36 initialization is handled differently. When the
compiler recognizes that it is compiling 'main' it compiles in a call
to __main as the first statement of the procedure. ___main is defined
in libg++.a(gnulib3.o), and handles calling the constructors.
My problem is finding an elegant method for invoking ___main
correctly. So far the best I've been able to do is to to explicitly
call ___main from my C main program.
Are there better solutions?
Thanks,
John
--
John Riedl
{ucbvax,decvax,hplabs}!purdue!riedl -or- riedl@cs.purdue.edu