Re: Utilizing OTHER_CFLAGS properly?
Re: Utilizing OTHER_CFLAGS properly?
- Subject: Re: Utilizing OTHER_CFLAGS properly?
- From: Fritz Anderson <email@hidden>
- Date: Tue, 22 Dec 2009 10:01:41 -0600
I'm not Chris Espinosa; I don't even work for Apple. But maybe I know something...
On 22 Dec 2009, at 9:45 AM, Sam Krishna wrote:
> I'm attempting to utilize OTHER_CFLAGS in the target's build settings (under User Defined settings) for different build configurations (Release vs. Debug vs. Demo, etc)
Why are you attempting to set OTHER_CFLAGS as a user-defined setting? It already has a UI setting; I wonder if attempting to set it user-defined doesn't get overridden by the setting provided for the purpose.
If the UI setting doesn't appear in the list, add a .c or .m file to the project. Xcode often won't include compiler settings until there's something in the target to compile.
> Right now, I've tried:
>
> OTHER_CFLAGS=1
Leaving aside the issue of whether it should be user-defined, this doesn't make sense. First, the UI separates the name of the setting from the value by putting them in different columns. An "=" shouldn't enter into it. Second, even if the syntax were right, simply adding a "1" to a gcc command line will only get you an error.
> OTHER_CFLAGS="-DTEST_FLAG=1"
There's already a UI setting for preprocessor defines. Search the build-setting list for "Preprocessor Macros" and "Preprocessor Macros not used in Precompiled Headers."
> and neither registers at compile time.
How do you mean "neither registers," and how do you know? In the Build Results window, set the build-progress display to show all the build steps, select a row for a C/ObjC compilation, copy, and paste into a text file. Examining the actual gcc command line will tell you something.
— F
_______________________________________________
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