Re: RTTI Preprocessor flag
Re: RTTI Preprocessor flag
- Subject: Re: RTTI Preprocessor flag
- From: Chris Espinosa <email@hidden>
- Date: Fri, 1 Apr 2005 17:07:42 -0800
On Apr 1, 2005, at 3:45 PM, Brant Sears wrote:
Yes, I know how to turn RTTI on. However, I want to be able to
programatically check at compile time for whether RTTI is on. Such as:
#if __RTTI_ENABLED
pFoo = dynamic_cast<Foo*>(myPointer);
#endif
...and so forth. I would like to know what the equivalent of
"__RTTI_ENABLED" in xCode.
Sorry, I didn't read carefully the first time. No, gcc generally
doesn't have #pragmas like CodeWarrior that let you know the settings
of compiler flags. You can, however, add a Preprocessor Macro that
is the value of the Xcode build setting:
__RTTI_ENABLED=$(GCC_ENABLE_CPP_RTTI)
and it will be expanded at build time to NO or YES, which you can
check for in source.
Chris
_______________________________________________
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