[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should one build shared libraries by default?
From: |
Tyler MacDonald |
Subject: |
Re: should one build shared libraries by default? |
Date: |
Sun, 30 Jul 2006 11:37:35 -0700 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Ed Hartnett <address@hidden> wrote:
> I am wondering if I should make --disable-shared the default, and only
> build shared libraries for users who specifically enable them.
>
> Is there some important benefit to building shared libraries by
> default which I am missing?
Shared vs. Static really depends on how your application(s) are
being used and what architecture(s) they are being used on.
Questions to ask yourself;
- Is the library likely to be upgraded separate from the
application(s) that use it?
- Is there going to be more then one copy of the application(s)
linking to the library running at once, on the same machine?
- What's more important? Speed or RAM? On some architectures (eg;
i386), static libraries are slightly faster, but having the library be
shared means that only one copy has to be loaded, to be shared across all
the applications using it.
- What architecture? If it's for, say, an embedded system, static
may be the only way you can go. This URL goes over the generalites of all of
this, and dives a bit deeper into the whole embedded scenario:
http://www.cadenux.com/xflat/NoMMUSharedLibs.html
Cheers,
Tyler