Best practice for OS version and SDK conditionals?
Best practice for OS version and SDK conditionals?
- Subject: Best practice for OS version and SDK conditionals?
- From: William Bates <email@hidden>
- Date: Thu, 3 Apr 2008 11:50:47 -0500
I'm updating and trying to put away some code until the next OS
revision, and I'm trying to figure out not _how_ - I know this - but
the _best_ place to set compiler variables such as
MAC_OS_X_VERSION_MAX_ALLOWED;
I'm also trying to work out some of the interactions of these sorts
of compiler conditionals with precompiled headers.
A lot of these source files are in areas such as CoreAudio that
have changed a lot from OS 10.3 to OS 10.5. My end goal is to get them
as self-documented as possible....
Here are some questions:
(1) Should I #include <AvailabilityMacros.h> in my Prefix.pch?
(2) If yes, should I use precede it with #define
MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 etc., type
statements, or not?
(3) When compiling, how can I just dump (using #warning or similar)
the current setting(s) of compile time variables like
MACOSX_DEPLOYMENT_TARGET?
(4) What syntax works on compiler conditionals? For example,
(MACOSX_DEPLOYMENT_TARGET > MAC_OS_X_VERSION_10_4) works but >= does
not.
I'm happy to hear opinions on practices that are probably matters of
style and taste.
I'm using Xcode 3.1 beta (dare I speak its name?)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden