| View previous topic :: View next topic |
| Author |
Message |
ffelagund
Joined: 16 Mar 2006 Posts: 14
|
Posted: Mon Jun 11, 2007 3:45 am Post subject: libc problems |
|
|
Hello,
I'm trying to setup my own makefile for my psp projects, but I'm a bit lost with the libc library. I really dont know what should I inlude in the link stage to make things work. Here is my link line and the errors I got. Some help would be very appreciated :)
| Code: | psp-gcc src/tinyxml/tinyxml.o src/tinyxml/tinystr.o src/tinyxml/tinyxmlerror.o src/tinyxml/tinyxmlparser.o src/psptest.o -L/usr/local/pspdev/psp/sdk/lib -lpspgum -lpspgu -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o outdir/psptest.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(lib_a-strtod.o): In function `strtod':
../../../../../newlib/libc/stdlib/strtod.c:1155: multiple definition of `strtod'
/usr/local/pspdev/psp/sdk/lib/libpsplibc.a(strtod.o):/home/jacobo/psptoolchain/build/pspsdk/src/libc/stdlib.c:757: first defined here
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(lib_a-strtol.o): In function `strtol':
../../../../../newlib/libc/stdlib/strtol.c:222: multiple definition of `strtol'
/usr/local/pspdev/psp/sdk/lib/libpsplibc.a(strtol.o):/home/jacobo/psptoolchain/build/pspsdk/src/libc/stdlib.c:874: first defined here
collect2: ld returned 1 exit status
Error, could not find file outdir/psptest.elf
make: *** [outdir/psptest.elf] Error 1
psp-fixup-imports outdir/psptest.elf
|
_________________ I dont know... flight casual! |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Mon Jun 11, 2007 10:22 am Post subject: |
|
|
| Quote: | | 1155: multiple definition of `strtod' |
You're linking both psplibc and libc, just use libc. |
|
| Back to top |
|
 |
ffelagund
Joined: 16 Mar 2006 Posts: 14
|
Posted: Mon Jun 11, 2007 4:59 pm Post subject: |
|
|
Thanks, that solved that problem. I also had many errors caused by libs misorder. but I last I got a lib secuence that finally worked.
I think that I have to read this forum more deeply before continuing doing things to avoid those kind of gnu tramps...
Thanks,
Jacobo. _________________ I dont know... flight casual! |
|
| Back to top |
|
 |
|