| View previous topic :: View next topic |
| Author |
Message |
zerocom
Joined: 08 Jun 2004 Posts: 12
|
Posted: Thu Jul 15, 2004 9:23 pm Post subject: PS2SDK with C++ problem |
|
|
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... |
|
| Back to top |
|
 |
rasmus
Joined: 21 Jul 2004 Posts: 17 Location: Göteborg, Sweden
|
Posted: Wed Jul 21, 2004 9:39 am Post subject: |
|
|
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:
| Code: |
$ ee-gcc -nostartfiles -Tlinkfile crt0.o main.o -lstdc++ -lc -lkernel -lsyscall -lc
|
|
|
| Back to top |
|
 |
zerocom
Joined: 08 Jun 2004 Posts: 12
|
Posted: Thu Jul 22, 2004 8:28 pm Post subject: |
|
|
Thanks for the info ...
I tried linking using the gcc instead of the g++ but it gaves a linking error with some c++ stuff. But this may be caused by the missing libstdc++.
I'll try your solution and report again ...
Bye... |
|
| Back to top |
|
 |
|