Dead code stripping kills RTTI data?
Dead code stripping kills RTTI data?
- Subject: Dead code stripping kills RTTI data?
- From: "Tim Conkling" <email@hidden>
- Date: Wed, 7 Nov 2007 11:18:28 -0800
In the past, I've struggled with GCC and RTTI issues in a
library/application C++ project (cross-library dynamic_casts would
fail because of some mismatch between the way the RTTI data was being
generated in the library and the app). This problem has resurfaced in
a recent upgrade to Xcode 3. The "DEAD_CODE_STRIPPING" build setting
seems to be the issue -- turning dead code stripping on causes the
RTTI in the library and the application to become out of sync. Turning
it off makes the problem go away.
Changing this one build setting isn't such a big deal, of course, but
this particular issue has been a major thorn in my side since I
started using Xcode to port a Windows game to Mac a few months ago.
I've read the "Controlling Symbol Visibility" article and technote on
developer.apple.com, which made it seem like the
"-fvisibility-ms-compat" GCC flag was the answer to my woes, but the
problems persist.
The only solution I've successfully used to fix these problems is to
mindlessly toggle various build settings and rebuild the entire
project until I find the magical configuration that solves my problem.
Today it was DEAD_CODE_STRIPPING. Even then, some strange problems
persist.
Any insights into why this build setting is messing things up for me?
Any insights into how to protect myself from this issue in the future?
Is there a certain set of build settings that will tell GCC that, no
matter what, I need my RTTI data to be the same across libraries?
Thanks,
Tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden