Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
- Subject: Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
- From: Jens Alfke <email@hidden>
- Date: Thu, 11 Aug 2016 17:09:37 -0700
> On Aug 11, 2016, at 12:09 AM, Sasikumar JP <email@hidden> wrote:
>
> Xcode defines following build variables, we can not use them in Xcode 8
> as the values are invalid octal number.
Who says they’re supposed to be octal? The reason for the leading zero is presumably just so they’ll still sort correctly when Xcode 10 is released.
Remember, environment variables are strings, and they’re language-independent; not all languages follow C in interpreting a leading 0 as meaning octal.
You could fix your preprocessor macro by making it a string, something like
XCODE_VERS="\"$(XCODE_VERSION_MAJOR)\”"
or perhaps hex:
XCODE_VERS=0x$(XCODE_VERSION_MAJOR)
—Jens
_______________________________________________
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