• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Framework versions and linkage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Framework versions and linkage


  • Subject: Framework versions and linkage
  • From: "email@hidden" <email@hidden>
  • Date: Sat, 19 Sep 2009 20:40:45 +0100

I thought the whole reason for having the multiple library symlinks in /usr/lib was so that binaries could link against the generic library name and have it resolve to the current version at runtime (as is done with the library symlinks inside frameworks.)

I have been thinking about the last bit of this statement (which appeared in a previous thread: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5).
So I went and re-read the Framework Programming Guide (and it certainly made a lot more sense now than it did the first time).


Looking at my app with otool -L I can see that it explicitly references the major version of various frameworks, say:

/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.0.0)

otool -l gives us

Load command 27
cmd LC_LOAD_DYLIB
cmdsize 96
name /System/Library/Frameworks/Foundation.framework/ Versions/C/Foundation (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 751.0.0
compatibility version 300.0.0


To me it seems that this code must link against version C, regardless of whether versions D..Z exist in the bundle or not.
C is not at its original compatible version number but at 751, which is nonetheless deemed to have retained a compatible interface with version 300.
This implies that the linkage is not really variable. The app has to find a compatible version of the major version C at the given path. If not, it perishes.


If D exists our app can only link against it after recompilation.

Is this correct or does a horrible confusion reign?

Jonathan Mitchell

Developer
http://www.mugginsoft.com





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Framework versions and linkage
      • From: Ken Thomases <email@hidden>
References: 
 >Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5 (From: Jim Correia <email@hidden>)
 >Re: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5 (From: Jens Alfke <email@hidden>)
 >Re: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5 (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5 (From: Jens Alfke <email@hidden>)

  • Prev by Date: Known Issue with Unit Tests in Xcode 3.2
  • Next by Date: unit testing bsd C library
  • Previous by thread: Re: Using libcrypto & the 10.6 SDK with a minimum OS requirement of 10.5
  • Next by thread: Re: Framework versions and linkage
  • Index(es):
    • Date
    • Thread