forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PS2SDK with C++ problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
zerocom



Joined: 08 Jun 2004
Posts: 12

PostPosted: Thu Jul 15, 2004 9:23 pm    Post subject: PS2SDK with C++ problem Reply with quote

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
View user's profile Send private message MSN Messenger
rasmus



Joined: 21 Jul 2004
Posts: 17
Location: Göteborg, Sweden

PostPosted: Wed Jul 21, 2004 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message
zerocom



Joined: 08 Jun 2004
Posts: 12

PostPosted: Thu Jul 22, 2004 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group