Re: Building For OS 10.1, 10.2, and 10.3
Re: Building For OS 10.1, 10.2, and 10.3
- Subject: Re: Building For OS 10.1, 10.2, and 10.3
- From: Chris Espinosa <email@hidden>
- Date: Mon, 5 Jan 2004 13:29:11 -0800
On Jan 3, 2004, at 9:31 PM, Erez Anzel wrote:
If you target Mac OS X 10.2, but you are linking to libraries from
10.3, then I would imagine that something could be missing or
mismatched when the application is run on 10.2.
I hope to hear a deeper explanation. Anyone?
The Cross-Development documentation explains this in depth.
If you want to build something on the current OS but make sure it runs
on older OS versions, you only need to set the Mac OS X Deployment
Target setting. This ensures that any APIs that you use that are newer
than that target are "weak-linked", that is, do not cause load-time
failures but are instead set to null. You need to check for null
before calling any API that was introduced after your target (this
includes later versions of that target: if you set your target to 10.2,
you may need to check for APIs introduced in 10.2.110.2.8 as well as
those introduced in 10.3.x)
You do not need to change the SDK setting from "Current" if all you
want to do is to run on older versions.
If you don't want to do the runtime checks for APIs, and you're not
using new Panther features, you can set the SDK to an older version
(10.2.8, for example). If you use 10.3.x constructs, you'll get a
compiler error or warning. Your code will run on 10.2 through 10.3.x.
In the future, you may want to "forward-develop" for a new version of
the Mac OS without upgrading your development machine to that version.
In that case you'd build on your Panther machine, but set the SDK for
that hypothetical future version: that way you can use the APIs in that
OS without actually running it on your development machine.
Chris Espinosa
Apple
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.