Re: Defining code based on build target
Re: Defining code based on build target
- Subject: Re: Defining code based on build target
- From: Howard Siegel <email@hidden>
- Date: Wed, 18 May 2011 13:19:47 -0700
What you are trying to do is perfectly fine to create a free vs non-free
version of your app.
The sticking point is how are you defining ISFREE???
The #if takes an expression which is evaluated to see if it is true
(non-zero) or false (zero).
Did you define ISFREE to be a non-zero numeric value?? If not, that is the
problem.
Either make ISFREE a 1, or else use #ifdef ISFREE instead.
- h
On Wed, May 18, 2011 at 13:09, Development <email@hidden>wrote:
> I have a version of an application that I want to contain different code
> based on the builded target.
> for instance I have a lite version. After defining the ISFREE value in the
> preprocessor macros... I tried using:
>
> #if ISFREE
>
> NSLog(@"It's Free");
>
>
> #endif
>
>
> Of course the line never prints.
> Is it possible to compile specific code based on target_name or using the
> preprocessor macros? Or am I wasting my time with
> this?_______________________________________________
>
>
_______________________________________________
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