dynamic libraries, libtool

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default dynamic libraries, libtool

    Trying to perform a somewhat whimsical "touch-up" provided a warning
    about my ignorance of OSX. It seemed like a good idea to update the
    existing /lib/libz1.1.3-dylib to the level of libz.1.1.4 that came with
    a perl module.

    My first question is whether there is a little more documentation on
    dynamic libraries than the "ld" and "libtool" man pages.

    The first minor problem arose when I first tried to create the dynamic
    library. Using "libtool -dynamic -o lib.dyn *.o", I was told I had a
    bunch of undefined names. Since these names looked familiar, I just
    threw a "-lc" on the "libtool" command, and the warnings went away.
    Will this come back to haunt me? Will this work whether or not
    "-dynamic" was used to compile the "*.o" files or the "-lc" files?

    Then I archived the old "libz.1.1.3", and found out existing programs
    don't magically recognize "libz.1.1.4". How can I get old programs to
    use "1.1.4"? There are some symbolic links in "/usr/lib", but it seems
    they aren't used. Or is it wrong to assume compatibility? Will I have
    to keep "1.1.3" forever?

    Are the "current/compatibility_version" flags in libtool purely
    informational, requiring special programming by the library user in
    order to be useful? Who looks at "install_name"?

    Everything seems OK for the moment, but I wonder if something
    #($*&saKHGsd *$&HEue SDxxW KF sjaUeefhjsdf#$%$(!)*
    ~*^^^^_
    ..
    ..
    ..
    OSX User Guest

  2. Similar Questions and Discussions

    1. libtool-1.4.3.tar.gz unavailable
      I'm running FreeBSD and trying to install mod_php4-4.3.3 from an updated ports tree. When it tries to fetch libtool-1.4.3.tar.gz, I get the...
    2. Event processing and dynamic libraries
      I'm a Windows programmer new to Mac OS X programming. I've made a static library for many of our Mac OS X projects that shows an application-modal...
    3. #16053 [Com]: Unable to Load Dynamic Libraries
      ID: 16053 Comment by: iandbigejunk at yahoo dot com Reported By: Akhatib at socal dot rr dot com Status: Bogus...
    4. [PHP-DEV] libtool -prefer-non-pic for apxs builds?
      Guys, what do you think about defaulting the build to use -prefer-non-pic and having libtool build a non-pic libphp4.so when building the Apache...
    5. Dynamic cast libraries
      How can I open a new castlib at runtime? I'm trying to create some nice generic scripts for common components in my movies and it would be nice...
  3. #2

    Default Re: dynamic libraries, libtool

    OSX User wrote:
    >Then I archived the old "libz.1.1.3", and found out existing programs
    >don't magically recognize "libz.1.1.4". How can I get old programs to
    >use "1.1.4"?
    I use 'otool -L' on the binary to see what shared-libs it uses.
    One can hope that the binary would like to find the 'libz' without a version number,
    but ...
    > There are some symbolic links in "/usr/lib", but it seems they aren't used.
    Are you sure?

    $ ls -l /usr/lib/*libz*
    -rwxr-xr-x 1 root wheel 56372 Jan 10 2003 /usr/lib/libz.1.1.3.dylib*
    lrwxr-xr-x 1 mgh staff 16 Aug 1 18:04 /usr/lib/libz.1.dylib@ -> libz.1.1.3.dylib
    lrwxr-xr-x 1 mgh staff 16 Aug 1 18:04 /usr/lib/libz.dylib@ -> libz.1.1.3.dylib

    Both libz.dylib and libz.1.dylib point to libz.1.1.3.dylib.
    You could change the links to point to your new libz.1.1.4.dylib
    and see if that helps.

    Or, install the new version in /usr/local/lib ! :-)



    Mike Hall Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139