• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue


  • Subject: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
  • From: Sasikumar JP <email@hidden>
  • Date: Thu, 11 Aug 2016 12:39:48 +0530

Hi,
   Xcode defines following build variables, we can not use them in Xcode 8
as the values are invalid octal number.

   XCODE_VERSION_ACTUAL = 0800
    XCODE_VERSION_MAJOR = 0800
    XCODE_VERSION_MINOR = 0800


I am working on iOS project, it should be compilable in both Xcode 7 and
Xcode 8.
I am planning to add the conditional compilation like below

preprocessor macro:

XCODE_VERS=$(XCODE_VERSION_MAJOR)


#if XCODE_VERS > 0700

@interface SampleTableCell : UITableViewCell<CAAnimationDelegate>

#else

@interface SampleTableCell : UITableViewCell

#endif


But this code throws the compilation error (Invalid digit '8' in octal
constant) in Xcode 8, since 0800 is not a valid octal value.

Is there any work around other than creating 2 different targets(separate
target for Xcode 7 and Xcode 8)

Regards
Sasikumar JP
_______________________________________________

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


  • Follow-Ups:
    • Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
      • From: Jens Alfke <email@hidden>
    • Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Next by Date: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Previous by thread: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Next by thread: Re: Xcode 8 - XCODE_VERSION_MAJOR causes compilation issue
  • Index(es):
    • Date
    • Thread