I've been experimenting with different c++ libs, and found out the following: The simple application:
#include <iostream>
int main(int argc, char* argv[])
{
try
{
throw 1;
}
catch(...)
{
std::cout << "Exception is caught\n";
}
}
When I compile it on ARM like this:
clang++ -stdlib=stdlibc++
The exception is caught as expected.
But when I change it to:
clang++ -stdlib=libc++
I am constantly getting:
terminating with uncaught exception of type int
Aborted
I've tried to turn on exception explicitly with various flags like:
-fexceptions
-fcxx-exceptions
-frtti
But none of these flags work. What is the reason of the uncaught exception? Could it be because incorrectly installed libc++?
P.S.
On the PC, the same program compiled with libc++ works as expected.
libc++ version is the same on both platforms - 3.7.0-1ubuntu0.1
nm a.out | grep _Unwind
. There may appear information about the expected symbol version, for example "@@@GCC_3.0" on may x86. But I wonder how linking phase could have been successfull anyway. – Jeffryjeffy