| View previous topic :: View next topic |
| Author |
Message |
JaCkRaC

Joined: 06 Oct 2004 Posts: 5
|
Posted: Wed Oct 06, 2004 11:04 pm Post subject: I need help about c++ dev with PS2DEV Environment. |
|
|
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 |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Wed Oct 06, 2004 11:11 pm Post subject: |
|
|
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 |
|
 |
JaCkRaC

Joined: 06 Oct 2004 Posts: 5
|
Posted: Thu Oct 07, 2004 12:31 am Post subject: |
|
|
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 |
|
 |
JaCkRaC

Joined: 06 Oct 2004 Posts: 5
|
Posted: Tue Oct 12, 2004 11:38 am Post subject: |
|
|
| Il n'y a personne pour m'aider ??? |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Tue Oct 12, 2004 5:09 pm Post subject: |
|
|
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 |
|
 |
JaCkRaC

Joined: 06 Oct 2004 Posts: 5
|
Posted: Mon Oct 18, 2004 6:18 am Post subject: |
|
|
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 |
|
 |
|