#17648 - cpu1333mhz - Thu Mar 11, 2004 9:58 pm
I am learning how to program for the GBA and am trying to create a simple background manager class. I get this error in the compiler (GCC):
D:\Programming\GBA\Tutor>gcc -o tutor.elf tutor.cpp -lm
C:\DOCUME~1\Bob\LOCALS~1\Temp/ccOcbaaa.o: In function `main':
C:\DOCUME~1\Bob\LOCALS~1\Temp/ccOcbaaa.o(.text+0x118): undefined reference to `__gxx_personality_sj0'
collect2: ld returned 1 exit status
Here is my class (this is a test class which does nothing):
class Test{
public:
Test(u16 tootoo){temp=tootoo;};
~Test(){}
void SetTemp(u16 tootoo){temp=tootoo;};
private:
u16 temp;
};
And here is my main code:
Test text0(8);
text0.SetTemp(55);
If I comment out the second line of my main code it complies properly. This same error has happened to me when trying to use any of the member functions of my real background manager class.
It seems like if i try to use any member functions of any class i get the error. Does anyone know whats wrong? I've tried GCC release 4 and GCC release 5 beta 3. Sorry if I am just being stupid, i'm a bit of a beginer :P
D:\Programming\GBA\Tutor>gcc -o tutor.elf tutor.cpp -lm
C:\DOCUME~1\Bob\LOCALS~1\Temp/ccOcbaaa.o: In function `main':
C:\DOCUME~1\Bob\LOCALS~1\Temp/ccOcbaaa.o(.text+0x118): undefined reference to `__gxx_personality_sj0'
collect2: ld returned 1 exit status
Here is my class (this is a test class which does nothing):
class Test{
public:
Test(u16 tootoo){temp=tootoo;};
~Test(){}
void SetTemp(u16 tootoo){temp=tootoo;};
private:
u16 temp;
};
And here is my main code:
Test text0(8);
text0.SetTemp(55);
If I comment out the second line of my main code it complies properly. This same error has happened to me when trying to use any of the member functions of my real background manager class.
It seems like if i try to use any member functions of any class i get the error. Does anyone know whats wrong? I've tried GCC release 4 and GCC release 5 beta 3. Sorry if I am just being stupid, i'm a bit of a beginer :P