Article View: gnu.gcc.help
Article #104ld: undefined symbol ___main
From: meissner
Date: Tue, 04 Aug 1992 06:12
Date: Tue, 04 Aug 1992 06:12
15 lines
1123 bytes
1123 bytes
| I was wondering if anyone has had this problem. When I compile a program on | gcc under sun4, I get an undefined symbol from ld of ___main. There is a | main() in one of the files. This is usually a symptom that libgcc.a is not being linked into your program. Check whether you are calling ld directly, or add the '-v' option when linking a program. The __main function (many UNIX systems add an extra '_' in front of all names) is in libgcc.a, and provides for calling the G++ static constructors and destructors. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 You are in a twisty little passage of standards, all conflicting.
Technical Details
Message-ID:
<9208041412.AA04926@tiktok.osf.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!osf.ORG!meissnerReferences:
meissner@osf.ORGShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!osf.ORG!meissner From: meissner@osf.ORG Subject: ld: undefined symbol ___main Message-ID: <9208041412.AA04926@tiktok.osf.org> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet References: meissner@osf.ORG Distribution: gnu Date: Tue, 4 Aug 1992 06:12:25 GMT Lines: 15