| View previous topic :: View next topic |
| Author |
Message |
71M
Joined: 21 Jun 2005 Posts: 122 Location: London
|
Posted: Sun Aug 28, 2005 2:41 am Post subject: PRX Lib Link Error |
|
|
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 |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sun Aug 28, 2005 4:00 am Post subject: |
|
|
| __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 |
|
 |
71M
Joined: 21 Jun 2005 Posts: 122 Location: London
|
Posted: Sun Aug 28, 2005 4:19 am Post subject: |
|
|
Brilliant that seems to have sorted it, thank you.
71M |
|
| Back to top |
|
 |
|