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 

I need help about c++ dev with PS2DEV Environment.

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



Joined: 06 Oct 2004
Posts: 5

PostPosted: Wed Oct 06, 2004 11:04 pm    Post subject: I need help about c++ dev with PS2DEV Environment. Reply with quote

I have already made some little demos with C. But I want, now, to make my progs in C++.
So I took the last PS2Dev Environment. But when I try to 'make' (compilation) the hello_c++ sample, I got an error on linking:
in function: 'main'
Undefined reference to _gxx_personality__v0

Why I got this error? How solve this problem? Do I got a patch for the binutils ?
Please, try to give me a lot of details, and don't use too much complicated sentences because I speak French!
Back to top
View user's profile Send private message
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Wed Oct 06, 2004 11:11 pm    Post subject: Reply with quote

How do you link exactly ?

You need to have libstdc++ linked with your final software, or linking using ee-g++ (which is about the same)

Et parler français semble devenir une tare ce jours-ci :D
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
JaCkRaC



Joined: 06 Oct 2004
Posts: 5

PostPosted: Thu Oct 07, 2004 12:31 am    Post subject: Reply with quote

Oups, Déjà une réponse ! :)

J'espère, PIXEL, que vous utilisez souvent PS2Dev environnement!
Voila l'exemple que je compile:

#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include "sio.h"

extern "C" { extern void _init( void ); }

int main()
{
_init();

SifInitRpc(0);

init_scr();
scr_printf("Hello, world!\n");

printf("Hello, world!\n");
nprintf("Hello, again, from Naplink RPC!\n");

sio_init(115200, 0, 0, 0, 0);
sio_printf("Hello from EE SIO!\n");

return 0;
}


Et voici le makefile utilisé:

EE_BIN = hello.elf
EE_OBJS = hello.o

all: $(EE_BIN)

clean:
rm -f *.elf *.o *.a

include ../../../Makefile.pref
include ../../../Makefile.eeglobal_cpp


La phase de compilation se passe correctement et le fichier hello.o est généré.
Mais il y a l'erreur lors du linkage.

Si vous le souhaitez, j'afficherai 'Makefile.eeglobal_cpp' dans mon prochain poste.

J'ai bien l'impression qu'il est temps pour moi d'apprendre a installer manuellement l'environnement de developpement PS2! =)
Back to top
View user's profile Send private message
JaCkRaC



Joined: 06 Oct 2004
Posts: 5

PostPosted: Tue Oct 12, 2004 11:38 am    Post subject: Reply with quote

Il n'y a personne pour m'aider ???
Back to top
View user's profile Send private message
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Tue Oct 12, 2004 5:09 pm    Post subject: Reply with quote

You shouldn't write in french only... although there may be some french that could give you some parts written in french if you don't understand everything, this is nicer for everybody to make efforts and write in english.

Now, you didn't include enough details (although the source code isn't C++, rather C, I guess this is only a test run.)

Rajoute le log produit lorsque tu tapes 'make'.
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
JaCkRaC



Joined: 06 Oct 2004
Posts: 5

PostPosted: Mon Oct 18, 2004 6:18 am    Post subject: Reply with quote

Thank you; pixel.
I will try to speak in English.

Can somebody give me a little c++ code example which I can build with PS2SDK?
I saw somewhere that I need to do some hacks in c++ code or some patchs on binutils, to build a c++ code file. Is that true?
Back to top
View user's profile Send private message
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