FROM : Bill Cheeseman
DATE : Mon Apr 18 22:42:04 2005
on 2005-04-18 3:18 PM, Rosyna at <email_removed> wrote:
> Even then, that's only if you don't take advantage of weak linking.
> Which is pretty trival to do.
>
> if (TigerOnlyFunction)
> TigerOnlyFunction("Hello!");
>
> Ack, at 4/18/05, Ali Ozer said:
>
>> If you use Tiger symbols or function calls (not methods or classes)
>> which are not appropriately weakly linked (they aren't declared as
>> AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER), your app might refuse to
>> launch at all.
Just to be clear, what Ali was describing are C functions that are not
marked with an availability macro. In that case, branching around the
function call does not allow the code to load. It's a dynamic loader issue
that you can't code around by simple branching. (Branching around
Objective-C method calls does work.)
I encounter this issue frequently when developing under early beta seed
releases of a new version of Mac OS X, in which the engineers haven't gotten
around to adding the availability macros to the new headers. There is a
workaround: redeclare the function in your own headers with the appropriate
availability macro. In fact, I think it was Ali who put me onto that
workaround.
--
Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
DATE : Mon Apr 18 22:42:04 2005
on 2005-04-18 3:18 PM, Rosyna at <email_removed> wrote:
> Even then, that's only if you don't take advantage of weak linking.
> Which is pretty trival to do.
>
> if (TigerOnlyFunction)
> TigerOnlyFunction("Hello!");
>
> Ack, at 4/18/05, Ali Ozer said:
>
>> If you use Tiger symbols or function calls (not methods or classes)
>> which are not appropriately weakly linked (they aren't declared as
>> AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER), your app might refuse to
>> launch at all.
Just to be clear, what Ali was describing are C functions that are not
marked with an availability macro. In that case, branching around the
function call does not allow the code to load. It's a dynamic loader issue
that you can't code around by simple branching. (Branching around
Objective-C method calls does work.)
I encounter this issue frequently when developing under early beta seed
releases of a new version of Mac OS X, in which the engineers haven't gotten
around to adding the availability macros to the new headers. There is a
workaround: redeclare the function in your own headers with the appropriate
availability macro. In fact, I think it was Ali who put me onto that
workaround.
--
Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes






Cocoa mail archive

