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: Loader Not Using Newer Library Version



Michael B Allen wrote:
I'm compiling my dylib as follows:

gcc -dynamiclib -current_version 0.8.25 \
   src/f1.pic.o src/f2.pic.o s -o libfoo.0.8.25.dylib

and installing it in /usr/local/lib like:

-rwxr-xr-x  libfoo.0.8.25.dylib
lrwxr-xr-x  libfoo.0.8.dylib -> libfoo.0.8.25.dylib
lrwxr-xr-x  libfoo.dylib -> libfoo.0.8.25.dylib
-rw-r--r--  libfoo.a

But when I increment the version, programs compiled with an older version
will not load:

  $ ./test
  dyld: ./test can't open library: libfoo.0.8.24.dylib
        (No such file or directory, errno = 2)
  Trace/BPT trap

The idea of the symlink
libfoo.0.8.dylib -> libfoo.0.8.25.dylib
is that the install_name of the library is libfoo.0.8.dylib. If you install a new version, it will still have the same install_name and the symlink will still be present, it will just point to the new version.


--
Martin

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

This email sent to email@hidden
References: 
 >Loader Not Using Newer Library Version (From: Michael B Allen <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.