Undefined Reference

Eddie CHEUNG [ESD] eddie@hkpc.org
Sat Apr 1 00:00:00 GMT 2000


I just built a cross complier hosted on solaris target to powerpc-elf.

When I test the cross gcc with my hello.c

#include <stdio.h>
int main()
{
 printf("Hello World\n");
 return 0;
}

Errors come up:

/opt/crossgcc/powerpc-elf/bin/gcc hello.c -o hello.o
/opt/crossgcc/powerpc-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 01800074
/var/tmp/ccWKCEit.o: In function `main':
/var/tmp/ccWKCEit.o(.text+0x20): undefined reference to `printf'
collect2: ld returned 1 exit status
make: *** [hello.o] Error 1

It seems to be the linker can not link the standard library. Can anyone help?





------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list