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!
I need help about c++ dev with PS2DEV Environment.
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
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.
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! =)
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! =)
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'.
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.