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: Different Darwin versions and dynamically linked programs



It depends on the compatibility version of the dylib you linked against.

For example,

I build an executable that links against CoreFoundation.

I take that executable and run it on an earlier version of Darwin. dyld will still link my executable against the old CoreFoundation because the compatibility version I originally built against is not lower than the one I'm linking against now. (Yeah, I had to read that twice too.)

As long as your executable links against a dylib with a higher compatibility version than what you built against, you're fine. If the compatibility version is lower, dyld complains and your executable doesn't run.

If you're interested in what dylibs your executable links against, run otool on it, with the "-L" option.
The following shows CoreFoundation's own compatibility info, as well as the compatibility info of the dylib it linked against, namely the Libsystem dylib:

[deatda:Library/Frameworks/CoreFoundation.framework] deatley% otool -L CoreFoundation
CoreFoundation:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 50.0.0)

For more info, refer to the man pages for otool and dyld.

- Dallas

On Wednesday, May 23, 2001, at 02:43 AM, Sherlock Holmes wrote:

Question, if I create dynamically linked executables on Darwin 1.3.3 will they normally run on Darwin 1.3? 1.2? What are the rules here for compatibility?

Thanks,

SH
_______________________________________________
darwinos-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/darwinos-users


References: 
 >Different Darwin versions and dynamically linked programs (From: Sherlock Holmes <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.