Re: Mystery of the missing symbol
Re: Mystery of the missing symbol
- Subject: Re: Mystery of the missing symbol
- From: Ken Thomases <email@hidden>
- Date: Sun, 02 Oct 2011 20:52:28 -0500
On Oct 2, 2011, at 7:50 PM, Graham Cox wrote:
> With a deployment target of 10.5, shouldn't the linker or compiler complain at some point?
No, that's not something that the deployment target affects. The whole point of specifying one version via the SDK but an earlier version via deployment target is that you can use the features of the later version corresponding to the SDK _if you detect at runtime that they're actually available_.
If the compiler or linker were going to complain when you used features newer than your deployment target then there would be no point. You'd pick an SDK and that would dictate your run-time requirement for minimum deployment OS, too.
If you want to figure out what will break when you run on an earlier OS, you should do a test build with a configuration that uses the SDK for that earlier OS. Then you address any errors by both putting a run-time condition checking for feature availability with fallback code and also using conditional compilation to disable that code when building for that earlier SDK (so that the compile can proceed and you find the next error). However, Apple has made this effectively impossible by dropping the 10.5 SDK from Xcode 4.x.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden