[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: Building a Shared Library
From: |
Guido Draheim |
Subject: |
Re: RFC: Building a Shared Library |
Date: |
Wed, 30 Jul 2003 09:30:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 |
Just trying to get terminology to the point, note that developers
from other platforms will most probably have known the term
"linker script", so let's expand on that knowledge without
driving away newbies.
Alexandre Duret-Lutz wrote:
All these examples ought be backed up with test cases, but I
haven't yet got around to do it. By the meantime, comments and
corrections (related to English or to Automake...) are greatly
welcome.
------------------------------
Building a Shared Library
=========================
Building shared libraries is a relatively complex matter. For this
reason, GNU Libtool (*note Introduction: (libtool)Top.) was created to
help build shared libraries in a platform-independent way.
Presentation of Libtool
-----------------------
Actually, Libtool abstracts shared and static libraries into an unified
concept henceforth called "Libtool libraries". Libtool libraries are
files using the `.la' suffix, and can designate a static library, a
shared library, or maybe both. What exactly it is, you cannot know
before `./configure'-time: not all platforms support all kinds of
libraries, and users can explicitly select which libraries should be
built. (However the package's maintainers can tune the default, *Note
The `AC_PROG_LIBTOOL' macro: (Libtool)AC_PROG_LIBTOOL.)
The libtool infrastructure abstracts the creation and usage of shared and
static libraries into a general concept of "libtool libraries". The
libtool library file uses the ".la" suffix being a linker script with some
platform dependent parts present in the ".libs" subdirectory. The linker
script can designate a static library, a shared library, or maybe both.
The actual type of the libtool library is determined at './configure'-time,
as not all platforms support all kinds of libraries, and users may
explicitly select which library types should be built. However the package's
maintainers can tune the default, (*Note The `AC_PROG_LIBTOOL' macro:
(Libtool)AC_PROG_LIBTOOL and (Libtool)AC_DISABLE_SHARED).
Because object files for shared and static libraries must be compiled
differently, Libtool also uses its own abstraction: "Libtool objects".
These are files ending with the `.lo' suffix. Libtool libraries are
built with Libtool objects.
Because object files for shared and static libraries must be compiled
differently, Libtool is also used during compilation. The intermediate
"Libtool object" files are created with the `.lo' suffix. Libtool
shared libraries are built from these Libtool objects.
- AC_LIBOBJ and C++, Norman Gray, 2003/07/22
- Re: RFC: Building a Shared Library, Ralf Corsepius, 2003/07/30
- Re: RFC: Building a Shared Library, Guido Draheim, 2003/07/30
- Re: RFC: Building a Shared Library, Alexandre Duret-Lutz, 2003/07/30
- Re: RFC: Building a Shared Library (take 2), Alexandre Duret-Lutz, 2003/07/30
- Re: RFC: Building a Shared Library (take 2), Norman Gray, 2003/07/30
- Re: RFC: Building a Shared Library (take 2), Alexandre Duret-Lutz, 2003/07/30
- Re: RFC: Building a Shared Library (take 2), Norman Gray, 2003/07/31
- Re: RFC: Building a Shared Library (take 2), Tim Van Holder, 2003/07/31