Article View: gnu.gcc.help
Article #49861Re: GCC 2.5.5 compile errors.
From: Christof Schwenzer
Date: Fri, 17 Dec 1993 11:17
Date: Fri, 17 Dec 1993 11:17
38 lines
2002 bytes
2002 bytes
In <2e7q6l$qed@skates.gsfc.nasa.gov> robinson@ltpsun.gsfc.nasa.gov (Jon Robinson) writes: >When I build programs with GCC 2.5.5, that were successfully built with >version 2.5.2 before with my make files; >I get the following error message. >robinson@forest% make >gcc -c -ggdb -I/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.5.5/include >-I/usr/local/leda/incl test2.C >ld.so: Undefined symbol: ___main >*** Error code 1 >make: Fatal error: Command failed for target > `/home/robinson/models/drivers/test/test2.o' >robinson@forest% >Where does it get the idea there should be a triple underline - main symbol? >This happens with all of my make files, whether they generated >good executables or gave strings of error messages. This is >all they do now! Any help appreciated -- 2.5.5 was just installed >by our system people yesterday. Could there be a failure of the >installation? >send E-mail replys to: >robinson@ltpsun.gsfc.nasa.gov >Thanks in advance. I had similar problems. The newer versions of gcc generate the symbol ___main when compiling the main() - procedure. Older versions generate this symbol only when compiling c++ - sources. For ought I know the symbol ___main is in yhe g++ - library. Hence you should try gcc test.c -lg++. I hope I could be of any use. Christof Schwenzer
Technical Details
Message-ID:
<1993Dec17.111747.15731@ifi.informatik.uni-stuttgart.de>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!xlink.net!news.belwue.de!ifi!schwencfReferences:
<2e7q6l$qed@skates.gsfc.nasa.gov>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,22d5758fdb2c368f X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-17 07:52:00 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!xlink.net!news.belwue.de!ifi!schwencf From: schwencf@donald.informatik.uni-stuttgart.de (Christof Schwenzer) Subject: Re: GCC 2.5.5 compile errors. Message-ID: <1993Dec17.111747.15731@ifi.informatik.uni-stuttgart.de> Sender: news@informatik.uni-stuttgart.de Organization: Informatik, Uni Stuttgart, Germany References: <2e7q6l$qed@skates.gsfc.nasa.gov> Date: Fri, 17 Dec 1993 11:17:47 GMT Lines: 39