libc problems

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ffelagund
Posts: 14
Joined: Thu Mar 16, 2006 9:44 pm
Contact:

libc problems

Post by ffelagund »

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: Select all

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!
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

1155: multiple definition of `strtod'
You're linking both psplibc and libc, just use libc.
ffelagund
Posts: 14
Joined: Thu Mar 16, 2006 9:44 pm
Contact:

Post by ffelagund »

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!
Post Reply