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

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

[avr-gcc-list] using exceptions


From: Kövesdi György
Subject: [avr-gcc-list] using exceptions
Date: Sat, 28 Apr 2012 10:51:27 +0200
User-agent: KMail/4.7.2 (Linux/3.1.9-1.4-desktop; KDE/4.7.2; i686; ; )

Hi,

I am using avr-g++ for building my projects for avr and i am happy with it. :-)
But i would need exception support, and could not find how to get it work. :-(
I found some mails in the archive (dated many years ago) about possibility of
building libstdc++ or libsupc++ with exception support, but could not find
how to do it. Reportedly it uses 10...20 kbytes of text, which would be 
acceptable.

Currently i have gcc 4.6.2 sources, and have tried the options 
--enable-sjlj-exceptions,
--with-exceptions, --with-rtti, --enable-libstdc++, etc... no one helped.

The result of my compilation is:

x.cpp:(.text+0x3c): undefined reference to `__gxx_personality_sj0'
x.cpp:(.text+0x3e): undefined reference to `__gxx_personality_sj0'
x.cpp:(.text+0xea): undefined reference to `__cxa_begin_catch'
x.cpp:(.text+0xf8): undefined reference to `__cxa_end_catch'
/tmp/ccmKuGSC.o:(.gcc_except_table+0x9): undefined reference to `typeinfo for 
void*'
collect2: ld returned 1 exit status

The source is:

int main(int argc, char ** argv)
{
 try {
    some_function();
 } catch (void *) {
    return 1;
 }
 return 0;
}

Please help me how to build the c++ library!

Thanx in advance
Gyorgy Kovesdi



reply via email to

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