[gnu.g++.help] Global Constructors

tiemann@eng.sun.com (Michael Tiemann) (01/26/91)

    I'm posting this in the hopes that someone out there understands my
    problem, and can be of assistance.

    We have a cross-compiling environment (target: sparc, host: i386).

    I have everything working, except for global constructors/destructors.

    In order to make the crt0 files for the 386, I have to run them
    through my cross-compiler.

    What happens when final linking is done with the program is this:

    There is a reference to ___main() from main.o which is undefined.

You need -lg++

Michael