I actually ran into this problem too.
I noticed that it knew what std::exception's were so I went and
looked at the exception header (i.e. exceptions derived from
std::exception were recognized as std::exception, not the derived
class). Wrapped around the exception declaration it has this:
#pragma GCC visibility push(default)
extern "C++" {
// Exception declaration here
} // extern "C++"
#pragma GCC visibility pop
I did the same for my exception declarations and it worked.
HTH,
-andy
--
Andy Finnell
Senior Software Architect
Order N Development, LLC
http://www.orderndev.com
On Feb 2, 2006, at 7:40 AM, Gert Thijs wrote:
Hi,
I have a question about the settings in Xcode to generate code
that handles exception correctly.
We have developed a generic shared c++ library in one Xcode
project in which we implemented several exception handling classes
that inherit from std::exception. Now, we are working on a new c++
project in Xcode where we use this library together with a lot of
new classes and also other shared libraries (eg. mysql++).
Everything compiles without any problem and runs fine except when
an exception is thrown from within the used shared libraries.
These exceptions are not caught since the type does not seem to be
the same.
I have searched quite a bit for information about this problem but
I have never found a satisfactory answer on how to tackle this
problem. As far as I understand it, the problem originates from
the way the shared library is constructed and how objects in the
library are referenced. So my guess is that there should be a set
of options to Xcode or gcc or the linker to avoid this.
Has anyone any experience with this since I have tried several
combination of options (like -fexceptions, -Bsymbolic) but none of
them seemed to have any effect.
Gert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/andyfinnell%
40orderndev.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/steve%
40improvision.com
This email sent to email@hidden