"libcglue.c" Errors

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

Moderators: cheriff, TyRaNiD

Post Reply
ddgFFco
Posts: 11
Joined: Tue Sep 20, 2005 5:35 pm

"libcglue.c" Errors

Post by ddgFFco »

Hey, I’m having some problems linking my app. I used to be able to compile/link everything fine when I was using the traditional cygwin.bat and including build.mak into my makefiles. But I have recently moved to the eclipse IDE and completely written my own makefile, problem is I now get linker errors (I have changed my code so that may affect it, but I don’t see how) I also don’t see what build.mak is doing that I’m not, anyway here are the errors:

Code: Select all

make -k BUILDPLATFORM=PSP build 
psp-g++ -L../CE/Lib/PSP -L/usr/local/pspdev/psp/sdk/lib ./Objs/PSP/Main.o ./Objs/PSP/Clip_TestImage.o -lCE -lpspgum -lpspgu -lm -lpspdisplay -lpspge -lc  -lstdc++ -lpspsdk -lpsputility -lpspuser -lpspkernel -o ./Bin/PSP/Main.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_Exit.o): In function `_exit':
../../../../../../newlib/libc/sys/psp/libcglue.c:696: undefined reference to `sceKernelSelfStopUnloadModule'
../../../../../../newlib/libc/sys/psp/libcglue.c:703: undefined reference to `sceKernelExitThread'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_Exit.o): In function `__psp_libc_init':
../../../../../../newlib/libc/sys/psp/libcglue.c:729: undefined reference to `sceKernelStdin'
../../../../../../newlib/libc/sys/psp/libcglue.c:733: undefined reference to `sceKernelStdout'
../../../../../../newlib/libc/sys/psp/libcglue.c:737: undefined reference to `sceKernelStderr'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_fstat.o): In function `_fstat':
../../../../../../newlib/libc/sys/psp/libcglue.c:479: undefined reference to `sceIoLseek'
../../../../../../newlib/libc/sys/psp/libcglue.c:481: undefined reference to `sceIoLseek'
../../../../../../newlib/libc/sys/psp/libcglue.c:482: undefined reference to `sceIoLseek'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_lseek.o): In function `_lseek':
../../../../../../newlib/libc/sys/psp/libcglue.c:263: undefined reference to `sceIoLseek'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_open.o): In function `_open':
../../../../../../newlib/libc/sys/psp/libcglue.c:191: undefined reference to `sceIoOpen'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_read.o): In function `_read':
../../../../../../newlib/libc/sys/psp/libcglue.c:234: undefined reference to `sceIoRead'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_sbrk.o): In function `_sbrk':
../../../../../../newlib/libc/sys/psp/libcglue.c:434: undefined reference to `sceKernelAllocPartitionMemory'
../../../../../../newlib/libc/sys/psp/libcglue.c:436: undefined reference to `sceKernelGetBlockHeadAddr'
../../../../../../newlib/libc/sys/psp/libcglue.c:430: undefined reference to `sceKernelMaxFreeMemSize'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_sbrk.o): In function `__psp_free_heap':
../../../../../../newlib/libc/sys/psp/libcglue.c:456: undefined reference to `sceKernelFreePartitionMemory'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_write.o): In function `_write':
../../../../../../newlib/libc/sys/psp/libcglue.c:250: undefined reference to `sceIoWrite'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_close.o): In function `_close':
../../../../../../newlib/libc/sys/psp/libcglue.c:218: undefined reference to `sceIoClose'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(_stat.o): In function `_stat':
../../../../../../newlib/libc/sys/psp/libcglue.c:536: undefined reference to `sceIoGetstat'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libc.a(chdir.o): In function `chdir':
../../../../../../newlib/libc/sys/psp/libcglue.c:97: undefined reference to `sceIoDopen'
../../../../../../newlib/libc/sys/psp/libcglue.c:102: undefined reference to `sceIoDclose'
../../../../../../newlib/libc/sys/psp/libcglue.c:104: undefined reference to `sceIoChdir'
collect2: ld returned 1 exit status
make: *** [build] Error 1
(libCE is self coded)

Any idea whats wrong? Any more libs I should be linking with? Is the order wrong? … need more info?

Thanks
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

Any more libs I should be linking with?
At least pspkernel and libc. Check out what was in build.mak.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Add another -lc to the front of your libraries; psp-g++ moves the first one. Or link with psp-gcc. Also read http://forums.ps2dev.org/viewtopic.php?p=31516#31516
ddgFFco
Posts: 11
Joined: Tue Sep 20, 2005 5:35 pm

Post by ddgFFco »

jimparis wrote:Add another -lc to the front of your libraries; psp-g++ moves the first one. Or link with psp-gcc. Also read http://forums.ps2dev.org/viewtopic.php?p=31516#31516
Odd, but adding another -lc to the front of the libraries worked, thanks.
Post Reply