• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RTTI Preprocessor flag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >RE: RTTI Preprocessor flag (From: "Brant Sears" <email@hidden>)

  • Prev by Date: Re: XCode and gcc - adding include directories
  • Next by Date: Re: XCode and gcc - adding include directories
  • Previous by thread: RE: RTTI Preprocessor flag
  • Next by thread: How do I view contents of a simple C buffer in XCode debugger?
  • Index(es):
    • Date
    • Thread