Re: How to write apps dependent on external libraries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/13/06, Shriramana Sharma <samjnaa@xxxxxxxxx> 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
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux