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 

PRX Lib Link Error

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



Joined: 21 Jun 2005
Posts: 122
Location: London

PostPosted: Sun Aug 28, 2005 2:41 am    Post subject: PRX Lib Link Error Reply with quote

Hi,
I'm trying to link the png lib into a PRX, but I'm getting the following error.

Code:
psp-gcc -I../../../ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nostartfiles   Main.o -lpng -lz -lc -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -o PNG.elf
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a(pspcwd.o): In function `__psp_init_cwd':
../../../../../../newlib/libc/sys/psp/pspcwd.c:28: undefined reference to `__psp_argv_0'
../../../../../../newlib/libc/sys/psp/pspcwd.c:28: undefined reference to `__psp_argv_0'
collect2: ld returned 1 exit status
make: *** [PNG.elf] Error 1


I couldn't find anything on the forums, so no doubt this'll be something foolish that I'm doing on my side :)

Cheers,
71M
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun Aug 28, 2005 4:00 am    Post subject: Reply with quote

__psp_argv_0 is defined in crt0.o, so you need to get rid of -mno-crt0 and -nostartfiles or specify the full path to crt0.o on the linker command line.
Back to top
View user's profile Send private message
71M



Joined: 21 Jun 2005
Posts: 122
Location: London

PostPosted: Sun Aug 28, 2005 4:19 am    Post subject: Reply with quote

Brilliant that seems to have sorted it, thank you.

71M
Back to top
View user's profile Send private message
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