How to determine if mac SDK is * less * than
I have an app targeting a 10.5 minimum platform and it compiles fine with SDK 10.6 or 10.7
However, when compiling with an older version of xcode with 10.5 SDK, the compilation fails and requires some additional #import (why I'm not sure, but it is) When I import the OpenGL header, I get a message that some types are not allowed by adding:
#import fixes the problem (where are the missing characters)
I don't want to #import unless absolutely necessary, and in particular not when compiling with 10.6 or 10.7.
I know how to check if I am using an SDK that is superior to the given version, for example:
#if MAC_OS_X_VERSION_10_5 > MACS_VERSION_MIN_REQUIRED
// Mac > 10.5 code here
#endif
The problem is in verifying that the converse condition turned out to be non-trivial, since all later versions of the SDK have all the definitions found in earlier versions.
I would like to find the equivalent:
#if COMPILING_WITH_10_5_OR_EARLIER
blah
#endif
Of course there must be an easy way I missed
source to share