• 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: Can't get "Preprocessor Macros" to work in Build Styles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get "Preprocessor Macros" to work in Build Styles


  • Subject: Re: Can't get "Preprocessor Macros" to work in Build Styles
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 23 Apr 2007 19:21:54 -0700

On Apr 23, 2007, at 5:32 PM, Rippit the Ogg Frog wrote:

Dennis C.De Mars reports being unable to get XCode's Preprocessor Macros setting to take effect in a build, and gave the workaround to use the Other C Flags setting.

I don't see a reply to him on the list.  Is there a way to get the build setting to take effect?  Has a Radar bug been filed?

I spent about an hour scratching my head over this until I found his mailing list post.

What do you mean by "take effect"?  If you have properly specified the Preprocessor Macros build setting in Xcode (note: not "XCode") then they will take effect in a build.

The key words above are "properly specified."  Build settings behave like variables in C; they can have different scopes, and a setting declared in an "inner" scope will override a setting with the same name declared in an "outer" scope.  In particular, a target build setting with a customized value will override a project build setting of the same name whether it has a customized value or not.

Note also that there is a difference between a setting with an empty customized value and not customizing a setting.  This is like the difference between the empty string and NULL in C.  If a setting's name in Xcode is in boldface, it's customized.

Thus if you have a customized, empty "Preprocessor Macros" build setting at the target level, it will prevent a populated "Preprocess Macros" build setting at the project level from affecting the build of that target.

  -- 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: Can't get "Preprocessor Macros" to work in Build Styles (From: Rippit the Ogg Frog <email@hidden>)

  • Prev by Date: LIFO window switching?
  • Next by Date: Re: Can't get "Preprocessor Macros" to work in Build Styles
  • Previous by thread: Re: Can't get "Preprocessor Macros" to work in Build Styles
  • Next by thread: Re: Can't get "Preprocessor Macros" to work in Build Styles
  • Index(es):
    • Date
    • Thread