Hello-
I'm linking a static library (freeimage.a) against my OS X application
(Xcode). The static library throws an exception (throw [number]) I want
to catch in my application. How can I propagate this C++ Exception into
my program? Is there any compiler switch?
I tried to compile the static library with -shared-libgcc, but this did
not help.
I also checked if exception are catched using the example below and the
handler works. However, not on the library exception.
Any ideas are welcome!
Thanks!
int number=41;
try {
// here I call my library ...
// just for exception testing
throw number;
} catch (...) {
printf("exception");
}
Alexander Grau - 29 Dec 2005 11:51 GMT
I could solve the issue by adding a compiler flag (-fexceptions) and now
the exception is already catched in the static library :-)
Alexander