Re: Where to define MAC_OS_X_VERSION_MAX_ALLOWED?
Re: Where to define MAC_OS_X_VERSION_MAX_ALLOWED?
- Subject: Re: Where to define MAC_OS_X_VERSION_MAX_ALLOWED?
- From: Chris Espinosa <email@hidden>
- Date: Tue, 16 Aug 2005 08:20:33 -0700
On Aug 16, 2005, at 7:40 AM, Sean McBride wrote:
Where am I supposed to define MAC_OS_X_VERSION_MIN_REQUIRED and
MAC_OS_X_VERSION_MAX_ALLOWED? In 'other C flags' and 'other C++ flags'
or in my .pch? Or either? I thought there was an actual setting in
the
Xcode UI, but I can't find it.
Both are set implicitly by other settings; you probably never need to
set them directly. Both are set by AvailabilityMacros.h according to
certain criteria.
MAC_OS_X_VERSION_MAX_ALLOWED is set according to the version of SDK or
system headers you are using. (Note that the name is somewhat of a
misnomer: your object code will run on Mac OS X versions later than the
version specified, of course.) It controls what APIs you can compile
against: if it's 1030, for example, APIs that are only available in
Tiger are not present in the headers you're building against. So you
can use this in your code to #if out a passage of code using newer
APIs.
MAC_OS_X_VERSION_MIN_REQUIRED is set according to you Mac OS X
Deployment Target build setting. It sets the earliest version you
expect to compile against. Symbols that are declared in this version
and earlier will link normally; symbols defined in the SDK or system
headers (up to MAC_OS_X_VERSION_MAX_ALLOWED) but later than this
version will be imported weak, and you must check at runtime.
So in truth these are read-only macros. The actual settings are the
SDK choice (SDKROOT) and the Mac OS X Deployment Target
(MACOSX_DEPLOYMENT_TARGET).
Chris
_______________________________________________
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