Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exception handling and shared libraries



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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.