Xref: utzoo gnu.g++.help:380 comp.lang.c++:11301 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!eng.sun.com!tiemann From: tiemann@eng.sun.com (Michael Tiemann) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: Global Constructors Message-ID: <9101261336.AA06323@teacake.Eng.Sun.COM> Date: 26 Jan 91 13:36:44 GMT References: <10968@ucrmath.ucr.edu> Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@cygnus.com Followup-To: gnu.g++.help Organization: Cygnus Support (+1 415 322 3811) Lines: 18 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