The following C++ program crashes when compiled with g++:
The error is:
Running ldd on the executable shows that libstdc++ is from gcc44, not the base compiler:
If built with g++44 the program runs as expected.
Where should I look to fix that?
Code:
int main()
{
try {
throw 1;
} catch (int) {
return 0;
}
return 1;
}
The error is:
Code:
terminate called after throwing an instance of 'int'
Abort (core dumped)
Running ldd on the executable shows that libstdc++ is from gcc44, not the base compiler:
Code:
a.out:
libstdc++.so.6 => /usr/local/lib/gcc44/libstdc++.so.6 (0x800647000)
libm.so.5 => /lib/libm.so.5 (0x800955000)
libgcc_s.so.1 => /usr/local/lib/gcc44/libgcc_s.so.1 (0x800a74000)
libc.so.7 => /lib/libc.so.7 (0x800c80000)
If built with g++44 the program runs as expected.
Where should I look to fix that?