This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Help needed



Hi, guys,

Good morning!

Help needed!

I made a cross compiler on my solaris machine for powerpc-elf target.
Everything looks fine when I did the make.

When I used my powerpc-elf-gcc to compile and link my helloworld.c, I got
some error described below. Basically,
my helloworld.c is:
--------
#include <stdio.h>
void main()
{
	printf("Hello World!\n");
}
--------

The command line used for compile and link is: powerpc-elf-gcc -v -o
helloworld helloworld.c

The error is: Can't link printf codes from library!!

---------
GNU assembler version 2.9.1 (powerpc-elf), using BFD version 2.9.1

/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
collect2 -V -Qy -dn -Bstatic
-L/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.
2 -L/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/lib
/var/tmp/ccAEuQ8q.o
/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
libgcc.a
/export/home4/hji/compilers/powerpc-elf-1-17/lib/gcc-lib/powerpc-elf/2.95.2/
libgcc.a
/export/home4/hji/compilers/powerpc-elf-1-17/powerpc-elf/bin/ld: warning:
cannot find entry symbol _start; defaulting to 01800074
/var/tmp/ccAEuQ8q.o: In function `ppctest':
/var/tmp/ccAEuQ8q.o(.text+0x20): undefined reference to `printf'
GNU ld version 2.9.1 (with BFD 2.9.1)
  Supported emulations:
   elf32ppc
--------------------

Thanks, guys.

Hua

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]