On Jan 15, 2010, at 12:56 PM, Stonewall Ballard wrote: When I tried this, the compiler did not even warn when I used a function that's available only in a Mac OS version greater than what I set MAC_OS_X_VERSION_MAX_ALLOWED to. Preprocessing showed that the function I tried had __attribute__((unavailable)) attached to it, so it expanded correctly. Was this behavior changed?
You should not be changing these macros manually (using #define or -D on the command line). Instead, use the Mac OS X Deployment Target and Base SDK build settings to change these.
- Base SDK defines the OS version from which you want your software to be able to use features, and automatically sets MAC_OS_X_VERSION_MAX_ALLOWED for you.
- Mac OS X Deployment Target defines the earliest version of the OS on which you want your software to be able to run, and automatically sets MAC_OS_X_VERSION_MIN_REQUIRED for you.
Your quote of TN2064 is referencing Mac OS X 10.1 and 10.2, and the December 2002 Developer Tools; things have changed a bit since then.
Also, be sure that you aren't passing flags to the compiler such that it might ignore deprecation/availability warnings. I think by default it warns about deprecation and availability, but that can be disabled.
-- Chris
|