On Mar 29, 2006, at 8:33 PM, Clark Cox wrote: Now I'm confused. So, are you saying that something linked against the 10.2.8 SDK won't run under 10.3 or 10.4? I was under the impression that using a particular version of an SDK would limit me to the symbols available in that version of the OS, and that the app would therefore run on OSes from that version forward. For instance, if I select a 10.3 SDK, then I can use symbols that existed in the 10.3 version of the OS. If I actually use any of those symbols (assuming that I'm not weak-linking), then my app wouldn't run on 10.2, but it would run on 10.3 and 10.4+.
You are correct, except for the assuming-you're-not-weak-linking. If you use a Deployment Target that's lower than the SDK you use, you will be weak-linking.
I think what's confusing you is that the SDK has two parts, and the two parts have opposite effects.
One part is the headers, which you use at compile time. They determine the maximum limit of the power of Mac OS X you can use: the later the SDK, the more API available (well, except for deprecated APIs :-) )
The other part is the link libraries, which control what your program expects to find at run time. The better the correspondence between what you try to call and what's in the runtime system, the less work you have to do (e.g. in testing entry points before jumping to them).
Using an earlier SDK means you do less work. You rely on a smaller set of APIs and it's more reliable. But you can't do as much.
Using a later SDK with an earlier Deployment Version means you can do more, but have to do more work to ensure you run across systems.
Using a later SDK with a later Deployment Version means you can do it all with the least work, but your code will require a later OS.
Clear?
Chris |