C/C++ clashes using lastest PSP toolchain

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

Moderators: cheriff, TyRaNiD

Post Reply
TommyBear
Posts: 50
Joined: Fri Jun 24, 2005 11:21 pm

C/C++ clashes using lastest PSP toolchain

Post by TommyBear »

Hi Guys,

I'm getting this:

Code: Select all

actor.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
trying to compile a .cpp file. Now my compiler flags are:

$(CC) $(OBJS) -lm -lc -nostartfiles -o out

__gxx_personality_v0 is implemented in libstdc++, but if I include that using

$(CC) $(OBJS) -lm -lc -lstdc++ -nostartfiles -o out

I get:

Code: Select all

/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libstdc++.a(del_op.o): In function `operator delete(void*)':
../../../../libstdc++-v3/libsupc++/del_op.cc:49: undefined reference to `free'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `__register_frame':
../../gcc/unwind-dw2-fde.c:119: undefined reference to `malloc'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `__register_frame_table':
../../gcc/unwind-dw2-fde.c:157: undefined reference to `malloc'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `__deregister_frame_info_bases':
../../gcc/unwind-dw2-fde.c:201: undefined reference to `free'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `__deregister_frame':
../../gcc/unwind-dw2-fde.c:234: undefined reference to `free'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `start_fde_sort':
../../gcc/unwind-dw2-fde.c:402: undefined reference to `malloc'
../../gcc/unwind-dw2-fde.c:405: undefined reference to `malloc'
/usr/local/pspdev/lib/gcc/psp/4.0.0/libgcc.a(unwind-dw2-fde.o): In function `end_fde_sort':
../../gcc/unwind-dw2-fde.c:586: undefined reference to `free'
collect2: ld returned 1 exit status
Malloc and friends are implemented in libc, so what gives..... anyone? :(
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Re: C/C++ clashes using lastest PSP toolchain

Post by inomine »

TommyBear wrote: Malloc and friends are implemented in libc, so what gives..... anyone? :(
They are implemented in libc for specific architectures. Afaik the libc malloc does not work on the PSP, you will either have to write your own or wait for the PSP SDK to be released if you don't want to do that.
TommyBear
Posts: 50
Joined: Fri Jun 24, 2005 11:21 pm

Re: C/C++ clashes using lastest PSP toolchain

Post by TommyBear »

inomine wrote:
TommyBear wrote: Malloc and friends are implemented in libc, so what gives..... anyone? :(
They are implemented in libc for specific architectures. Afaik the libc malloc does not work on the PSP, you will either have to write your own or wait for the PSP SDK to be released if you don't want to do that.
Yep that's ok someone has already written these which is nice! :) Thanks everyone.
Post Reply