Professional Web Applications Themes

Compiling Zlib - dynamic vs static libs? - Mac Programming

Long story -> short. I'm trying to install Zlib 1.1.4 on a 10.1.4 Server box. Looking at what's already there, I see that Apple have symlinked libz.dynlib -> libz.1-1-3.dynlib. Running through the configure/make/install cycle I ran into an error which the Zlib FAQ identified as a known conflict with the MacOS version, and recommended changing the flags in the configure file to compile as the static library /usr/local/bin/libz.a Q1: can someone explain in PLAIN English the difference between a static and dynamic library. Q2: can I have both static and dynamic libraries of the same suite on the same system? ...

  1. #1

    Default Compiling Zlib - dynamic vs static libs?

    Long story -> short. I'm trying to install Zlib 1.1.4 on a 10.1.4 Server
    box. Looking at what's already there, I see that Apple have symlinked
    libz.dynlib -> libz.1-1-3.dynlib. Running through the configure/make/install
    cycle I ran into an error which the Zlib FAQ identified as a known conflict
    with the MacOS version, and recommended changing the flags in the configure
    file to compile as the static library /usr/local/bin/libz.a

    Q1: can someone explain in PLAIN English the difference between a static and
    dynamic library.

    Q2: can I have both static and dynamic libraries of the same suite on the
    same system?

    Q3: if I want to replace the existing dynamic lib., would it be as simple
    as removing the link to Apple's 1.1.3 version, then running configure/
    make test/make install as per the Zlib README file?

    Sorry if these seem like obvious questions, but until recently all my C
    programming was in Think/Symantec/CodeWarrior IDEs, and I'm still struggling
    to get to grips with all this configure/Makefile stuff.
    David Guest

  2. #2

    Default Re: Compiling Zlib - dynamic vs static libs?

    On Thu, 2 Oct 2003, David Stone wrote:
     
    Roughly speaking, when you use a static library, the libary's code is
    code is copied into your application. That version of the library will
    always be used regardless of whatever is installed on the system where
    your app is running.

    Is you are using a dynamic (or shared) library, then at compile time, the
    library's code is not copied into your app. At run time, the
    functions/globals you use from the application are imported from the
    library that is present on the system where the app is running. If the
    dynamic libs on the system where the app is running change (updated to fix
    bugs etc), then a dynamically linked app will automatically benefit from
    the changes.
     
    yes. 
    You'll need to replace the link from zlib to apple's version to your
    version.
     

    Fred

    Frederick Guest

Similar Threads

  1. Static vs. Dynamic XML
    By MaveK in forum Macromedia Flash Data Integration
    Replies: 4
    Last Post: October 3rd, 06:14 AM
  2. Converting Static to Dynamic -
    By waltonad0283 in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: August 1st, 08:43 PM
  3. Dynamic to static
    By T McDizzle in forum Coldfusion Database Access
    Replies: 8
    Last Post: July 3rd, 05:50 PM
  4. Static vs. Dynamic
    By E-Jax webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 5
    Last Post: November 19th, 03:49 AM
  5. Dynamic and Static IP
    By Johnny in forum Windows Networking
    Replies: 1
    Last Post: July 15th, 07:19 PM

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