Hi, Marshall Clow wrote:
The basic problem is that when the runtime compares type_info's to see if a catch block can catch the exception, it compares to see _if they have the same address_. This fails, of course, if a shared library and an application each have their own copy of the type_info structure. Mucking with the visibility of the symbols (your "loads of linker warnings" ) can fix this.
I have fixed the linker warnings, but the exception is still not caught. I tried two different things: 1) Compile the test application using -fvisibility=hidden according to known issues: http://developer.apple.com/releasenotes/DeveloperTools/RN-Id/index.html g++ test.cpp -fvisibility=hidden -lboost_filesystem-mt-1_34_1 -o test No more linker warnings will show up, but the exception still won't be caught. 2) Compile the static boost libs with -fvisibility=default (by patching the build file) and then g++ test.cpp -lboost_filesystem-mt-1_34_1 -o test Again, no linker warnings about visibility, but still the exception is not caught. I'm definitely using the static libs. Any hints? Regards, Lothar