Re: Trouble forking my project
Re: Trouble forking my project
- Subject: Re: Trouble forking my project
- From: Fritz Anderson <email@hidden>
- Date: Tue, 23 Mar 2010 20:44:42 -0500
On 23 Mar 2010, at 7:48 PM, Graham Cox wrote:
> I'm having a problem making settings in a new target apply in my code. I'm sure this is really simple and I'm missing something obvious.
>
> The point is to permit me to release bugfixes to my existing codebase while moving it forward in a more radical way for future versions. I duplicated my existing main target and added a user-defined setting to the new target which value is simply 'YES'. In some parts of my code I conditionalise based on #ifdef this new setting.
>
> The problem I'm having is that the condition is never true - it compiles as if the setting isn't defined. I did a clean build and new target settings such as the product name are correctly honoured. Why can't my code "see" my added define?
By "user-defined setting," do you mean you added a build variable of your own? Xcode wouldn't know to translate that into a compiler directive; build variables have a life (sometimes) as environment variables for the build tools, and to direct how Xcode sets compiler switches. They aren't compiler switches (still less preprocessor macros) themselves.
Or are you using the settings labeled /Preprocessor Macros( Not Used In Precompiled Headers)?/? Those would get into your compilations to be testable with #ifdef. In that case, take your question to xcode-users and post a sample compiler invocation from your build transcript.
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden