MIPS Cross Compiler
Fri Oct 12 16:26:00 GMT 2001
On 12-Oct-01, Matt Welsford wrote:
>Using the following invocation of the compiler:
> $ mips-elf-gcc main.c crt0.S -nostdlib -I../include
>I get the following error:
>/cygdrive/c/WINNT/TEMP/ccEsdqTG.o: In function `main':
>main.c(.text+0xc): undefined reference to `__main'
It's the -nostdlib that's getting you. __main is defined in libgcc.a, and
--nostdlib tells the compiler to omit that from the link. Depending on the
target, __main will run constructors and the like.
Hope that helps,
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc