views:

315

answers:

1
+3  A: 

Both the client .exe and the shared library should to be linked with libgcc in order to throw across shared library boundaries. Per the GCC manual:

... if a library or main executable is supposed to throw or catch exceptions, you must link it using the G++ or GCJ driver, as appropriate for the languages used in the program, or using the option -shared-libgcc, such that it is linked with the shared libgcc.

karunski
Just reading this place in the GCC manual :) I am trying to link third-party libraries statically, it looks like I need to learn this issue better. The program is working now, thank you.
Alex Farber
You can link to the third-party libraries statically, just make sure the third party libraries link to libgcc dynamically. Thus you will have only one instance of libgcc in your process.
karunski