Hi,
I'm trying to get a C++ project to work with PS2SDK, but i have some linking problems. I have to use ee-g++ for linking, but this results in an error with the libc.a, which cannot link fioWrite().
To fix this I already tried to link the whole ps2sdk with g++, but this doesn't fix this problem. Compiling the ps2sdk with g++ doesn't work because of some missing functionality of the g++.
Any solutions?
Bye...
PS2SDK with C++ problem
I pulled my hair slightly before I found a solution to this. The problem is the link order of the libraries. When you link with ee-g++ it adds libstdc++ to the link automatically, but unfortunately in the wrong order. Link with ee-gcc instead and add libstdc++ manually before any other libraries in ps2sdk. Also make sure you use the link order described before with libc include twice.
Like this:
Like this:
Code: Select all
$ ee-gcc -nostartfiles -Tlinkfile crt0.o main.o -lstdc++ -lc -lkernel -lsyscall -lc