Professional Web Applications Themes

dynamic libraries, libtool - Mac Programming

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 doentation 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 ...

  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 doentation 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. #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

Similar Threads

  1. Dynamic libraries and install paths
    By Wade in forum Mac Programming
    Replies: 1
    Last Post: October 18th, 06:00 AM
  2. libtool-1.4.3.tar.gz unavailable
    By Motherchucker in forum PHP Development
    Replies: 0
    Last Post: October 1st, 07:52 AM
  3. Event processing and dynamic libraries
    By Kalani Thielen in forum Mac Programming
    Replies: 0
    Last Post: August 14th, 04:21 PM
  4. #16053 [Com]: Unable to Load Dynamic Libraries
    By iandbigejunk at yahoo dot com in forum PHP Development
    Replies: 1
    Last Post: August 14th, 05:47 AM
  5. Dynamic cast libraries
    By Stephen Whipp in forum Macromedia Director Lingo
    Replies: 2
    Last Post: July 30th, 10:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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