forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libc problems

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
ffelagund



Joined: 16 Mar 2006
Posts: 14

PostPosted: Mon Jun 11, 2007 3:45 am    Post subject: libc problems Reply with quote

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
View user's profile Send private message Visit poster's website
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Mon Jun 11, 2007 10:22 am    Post subject: Reply with quote

Quote:
1155: multiple definition of `strtod'


You're linking both psplibc and libc, just use libc.
Back to top
View user's profile Send private message
ffelagund



Joined: 16 Mar 2006
Posts: 14

PostPosted: Mon Jun 11, 2007 4:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group