Page 1 of 1
I need help about c++ dev with PS2DEV Environment.
Posted: Wed Oct 06, 2004 11:04 pm
by JaCkRaC
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!
Posted: Wed Oct 06, 2004 11:11 pm
by pixel
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
Posted: Thu Oct 07, 2004 12:31 am
by JaCkRaC
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! =)
Posted: Tue Oct 12, 2004 11:38 am
by JaCkRaC
Il n'y a personne pour m'aider ???
Posted: Tue Oct 12, 2004 5:09 pm
by pixel
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'.
Posted: Mon Oct 18, 2004 6:18 am
by JaCkRaC
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?