avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] c++ new/delete and __gxx_personality_sj0 missing


From: Klaus Rudolph
Subject: [avr-gcc-list] c++ new/delete and __gxx_personality_sj0 missing
Date: Wed, 21 Aug 2002 10:53:23 +0200 (MEST)

Hi all,

I play arround a bit with c++. All works fine but creating 
objects with new give me the following error during link stage:

/tmp/ccyIPIkZ.o: In function `main':
/tmp/ccyIPIkZ.o(.text+0x8): undefined reference to `__gxx_personality_sj0'
/tmp/ccyIPIkZ.o(.text+0xa): undefined reference to `__gxx_personality_sj0'
/tmp/ccyIPIkZ.o(.text+0x44): undefined reference to `operator new(unsigned)'
/tmp/ccyIPIkZ.o(.text+0xc8): undefined reference to `operator delete(void*)'

the operators new/delete can be replaced by:
void * operator new(unsigned int s) {
    return malloc(s);
}

void operator delete(void *m) {
    free(m);
}

Any reason to do this not this simple way?
 
But what  have I to do to get the missing `__gxx_personality_sj0'? 

Is there a new g++ lib for that, maybe also with new delete operators?

Thanks
   Klaus



-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]