• 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
Re: How to get SDK at compile time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get SDK at compile time?


  • Subject: Re: How to get SDK at compile time?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 12 Aug 2014 17:55:42 +0700

On 12 Aug 2014, at 17:20, Manoah F. Adams <email@hidden> wrote:

>
> On Aug 12, 2014, at 02:44:000, Gerriet M. Denkmann wrote:
>
>> At runtime I do:
>> //	10.8.x or earlier needsSpecialTreatment
>> BOOL	needsSpecialTreatment = floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber10_8;
>>
>> But how to do it at compile time?
>>
>> Like:
>>
>> #if  BEFORE_10_10  <-- what to write here?
>> 	NSString *infoPlistKey = kSMInfoKeyPrivilegedExecutables;
>> #else
>> 	NSString *infoPlistKey =  @"SMPrivilegedExecutables";
>> #endif
>>
>> Gerriet.
>>
>>
>
> Hi !
>
> < AvailabilityMacros.h > has lots of useful macros for such situations, and is well self-documented, so check it out (for me its at /usr/local/AvailabilityMacros.h).
>
> For my similar situations, I use the form.....
>
> #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
> // newer stuff
> #else
> //  older stuff
> #endif

Excellent. Just what I needed.

Thanks a lot!


Kind regards,

Gerriet.


_______________________________________________

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


References: 
 >How to get SDK at compile time? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to get SDK at compile time? (From: "Manoah F. Adams" <email@hidden>)

  • Prev by Date: Re: How to get SDK at compile time?
  • Next by Date: NSMenu in NSTableView column
  • Previous by thread: Re: How to get SDK at compile time?
  • Next by thread: Re: How to get SDK at compile time?
  • Index(es):
    • Date
    • Thread