Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOSX10.3.0 sdk install?



On May 25, 2005, at 7:33 PM, Peter S Lau wrote:

On 5/25/2005 7:25 PM, "Chris Espinosa" <email@hidden> wrote:


Yes, the  Xcode 1.5 CD has the 10.3.0 SDK, which you can install individually,

even onto a Tiger/Xcode 2.0 system.


You can also use the 10.3.9 SDK in Xcode 2.0 to target 10.3.0 through 10.3.8

with the following caveats:


- you make sure to check before calling API introduced after 10.3.0 


What do you mean by check before calling API?



    /* Call a function that only exists in Mac OS X 10.3 or later */

    

#if defined(MAC_OS_X_VERSION_10_3) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
    if ( HIAboutBox != NULL ) {
        err = HIAboutBox(NULL);
    }
#endif

    

    /* Call a function that only exists in Mac OS X 10.4 or later */

    

#if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
    if ( HISearchWindowShow != NULL) {
        err = HISearchWindowShow(CFSTR("Cross-Development"), kNilOptions);
    }
#endif

The #ifs protect you from compile errors if you set the SDK (or build on a version of Mac OS X) whose headers don't have the symbol.

The if ( foo != NULL ) protects you from calling a weak-linked function that is not defined at runtime.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: MacOSX10.3.0 sdk install? (From: Peter S Lau <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.