Home Reverse colors Help
Single page Previous Contents Next

Development with GNU/Linux
9 / 30

Shared Libraries

The name of a static libraries file is like libname.a, while a shared libraries file is named libname.so.x.y.z, where:

This is the "real name" of a library file, the name of the file which contains it. In addition, a library has a "soname", the real name with only the major version number, which is a symbolic link to the real name. It may also have a "linker name", without any version number, a symbolic link to a "soname".

Configure dynamic linker run-time bindings.

ldconfig creates the necessary symbolic links and cache (/etc/ld.so.cache) for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories /usr/lib and /lib. Libraries listed in /etc/ld.so.preload will take precedence over the standard set.

This process can be overriden with the environment variable LD_LIBRARY_PATH: a colon-separated set of directories where libraries should be searched for first, before the standard set of directories.

Print shared library dependencies.

Previous Contents Next