Determining SDK version during preprocessing
Determining SDK version during preprocessing
- Subject: Determining SDK version during preprocessing
- From: Matt Gough <email@hidden>
- Date: Fri, 20 Jan 2006 16:17:43 +0000
What is the best way to determine the SDK version being used?
E.g I would like to say something like this:
#if SDK_VERSION >= 4
MachineLocation.u.dls.Delta = isDLS? 0x80: 0x00;
#else
// Using an older SDK so u.dls is not available.
MachineLocation.u.dlsDelta = isDLS? 0x80: 0x00;
#endif
In the old days, it used to be possible to test
UNIVERSAL_INTERFACES_VERSION, but that has been stuck at 0x400 for
all of OS X's lifetime.
All my searching through ConditionalMacros, TargetConditionals and
AvailabilityMacros didn't turn up anything usable.
Obviously I could define my own preprocessor macro, but I'd really
like my code to be dropped into any existing project without having
to manually define that flag (and keep it up to date if the SDK
actually changes).
Matt Gough
_______________________________________________
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