AW: Undefined Reference

Robert Wiesner rwiesner@cadul.com
Sat Apr 1 00:00:00 GMT 2000


Title: AW: Undefined Reference





Dear Eddie,


for me it looks like, that the cross gcc does not use the startup and standard libraries, or they are missing.
You may add them manualy or use the "correct" environment (whatever it means ;-)


Startups are named like crt*.o
Libraries like lib*.a


With best regards and a nice day,


Robert Wiesner
Project Manager, Tools E1
email: rwiesner@cadul.com



-----Ursprüngliche Nachricht-----
Von:    Mahesh [SMTP:revuri@seeyes.co.in]
Gesendet am:    Donnerstag, 17. Februar 2000 12:17
An:     Eddie CHEUNG [ESD]; crossgcc@sourceware.cygnus.com
Betreff:        Re: Undefined Reference


Try compiling in verbose, gcc prints out information showing where it found subprograms it invoked..
ex
<xxxx>-gcc -v -S hello.c



> > "Eddie CHEUNG [ESD]" wrote:
> >
> > > 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



------
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