🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #597

Re: I keep getting "ld: Undefined symbol ___main" errors

#597
From: Vince Tessier
Date: Mon, 09 Nov 1992 21:52
19 lines
1223 bytes
man@magwien.gv.at (Andreas Manessinger) writes:

>>>>>> On Sun, 8 Nov 1992 23:14:55 GMT, vtessier@vela.acs.oakland.edu (Vince Tessier) said:

> Vince> when I go to link the executable, I get a message of the form
> Vince> 	main.o(.text+4): undefined reference to `___main' 

>`_main' is a symbol from `libgcc.a' that is automatically linked,
>whenever you call `gcc' for linking.

My problem seems to be that libgcc.a *isn't* being linked in by gcc.
I'm mostly building the other gnu packages, and a typical link command
is of the form
	gcc -o foo bar.o zot.o quux.o
which fails with the above message.  This problem does not occur when
-- 
Vince Tessier	vtessier@vela.acs.oakland.edu

"Think global, act loco."  -- Zippy
Technical Details
Message-ID: <vtessier.721345978@vela>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!netsys!decwrl!elroy.jpl.nasa.gov!sdd.hp.com!ux1.cso.uiuc.edu!cs.uiuc.edu!vela!vela!vtessier
References: <vtessier.721264495@vela> <MAN.92Nov9162140@imrryr.at>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!netsys!decwrl!elroy.jpl.nasa.gov!sdd.hp.com!ux1.cso.uiuc.edu!cs.uiuc.edu!vela!vela!vtessier
From: vtessier@vela.acs.oakland.edu (Vince Tessier)
Subject: Re: I keep getting "ld: Undefined symbol ___main" errors
Message-ID: <vtessier.721345978@vela>
Organization: Oakland University, Rochester MI.
References: <vtessier.721264495@vela> <MAN.92Nov9162140@imrryr.at>
Date: Mon, 9 Nov 1992 21:52:58 GMT
Lines: 19