From: "Steve Graegert" <graegerts@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: How to write apps dependent on external libraries?
Date: Thu, 13 Jul 2006 18:40:40 +0200 [thread overview]
Message-ID: <6a00c8d50607130940s5db9d08agd27be1f6031f221@mail.gmail.com> (raw)
In-Reply-To: <200607132134.57378.samjnaa@gmail.com>
On 7/13/06, Shriramana Sharma <samjnaa@gmail.com> wrote:
> Often I see apps which are dependent on this .so file or that. I don't know
> how apps can be written that depend on libraries that are not linked into the
> executable. So far I have been linking all needed libraries into the
> executable.
>
> A .so is a collection of what? An .a is a collection of .o-s, right? What is
> a .la? I am so very confused.
An .so file is a shared library, a collection of object files,
allowing executables to be linked against at __runtime__. They are
called shared objects, because multiple processes can make use of them
without keeping a private copy in their process space. Additionally,
shared libraries are normaly self contained, which means that they do
not contain references that cannot be resolved at runtime. For
example, libpng makes use of routines from libz which is loaded at
runtime automatically. If both libs were static (.a files, yes, a
collection .o files) all programs that depend on those libraries must
be linked against them at __compile time__. Shared objects are loaded
into memory at runtime on behalf of another shared object ld.so and
ld-linux.so for ELF binaries.
The .la files are used for linking and versioning by libtool and are
created automatically. It is a simple text file that contains some
important information for both static and shared libraries.
Hope that helped.
\Steve
next prev parent reply other threads:[~2006-07-13 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 16:04 How to write apps dependent on external libraries? Shriramana Sharma
2006-07-13 16:13 ` Mihai Dontu
2006-07-13 16:40 ` Steve Graegert [this message]
2006-07-14 0:28 ` Glynn Clements
2006-07-14 10:32 ` Markus Rechberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a00c8d50607130940s5db9d08agd27be1f6031f221@mail.gmail.com \
--to=graegerts@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).