function reference from standard library
Mark Powell (medp@primag.co.uk)
Tue, 13 Oct 1998 12:12:04 +0100
On 13-Oct-98 Dony wrote:
> Yeah, I suspect also the same, since even main function reference
> wasn't found.
>
> x----------
> main.o(.text+0x18):main.c undefined reference to '__main'
> x----------
.. snip
> LDFLAGS = -s -n -Tmsdsl.ld -L$(LIB)
> driver: msdsl.ld $(PROG)
> $(LD) $(LDFLAGS) -Map=driver.map -o driver.x $(PROG)
you need to add -lc to this link command to pick up the main C library. Also
-lm if you have any math calls. The -L sets the search path for the -l.
--
Mark Powell, Senior Software Engineer, Primagraphics Limited
New Cambridge House, Litlington, nr.Royston, Herts, SG8 0SS, UK
Tel. +44 1763 852222, Fax. 853324, medp@primag.co.uk, http://www.primag.co.uk
________________________________________________
To get help for the crossgcc list, send mail to
crossgcc-request@cygnus.com with the text 'help'
(without the quotes) in the body of the message.