Re: Can't get "Preprocessor Macros" to work in Build Styles
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