libname.so.major_version_no.minor_version_no
Typically, a symbolic link is created in the library named
libname.so, which points to the most current
version of the library. For example, on an ELF system like Solaris,
libMagick.so.5.0.44 is the name of an actual
library. If this is the latest installed version of the library, you
can find symbolic links that point to this library in the same
directory. These symbolic links are typically created during the
installation process.
In this example, both libMagick.so and
libMagick.so.5 are symbolic links that point to
libMagick.so.5.0.44. Older versions of the
library may also be present, such as
libMagick.so.5.0.42. However, although older
versions of the library may be present, whenever a newer version is
installed, the symbolic links are updated to point to the latest
version. This works because when you create a shared library, you
need to specify the name of the library to be used when the library
is called by a program at runtime.
TIP:
In general, you should keep older versions of libraries around, just
in case an application depends on them. If you are certain there are
no dependencies, you can safely remove an older version.
On Mac OS X, the libMagick library is named
libMagick.5.0.44.dylib, and the symbolic links
libMagick.dylib and
libMagick.5.dylib point to it. Older versions,
such as libMagick.5.0.42.dylib, may also be
found in the same directory. One difference that is immediately
apparent on Mac OS X systems is that the version numbers are placed
between the library name and the .dylib
extension rather than at the end of the filename, as on other Unix
systems (e.g., libMagick.so.5.0.42).
Another difference on Darwin is that the absolute pathname is
specified when the library is installed. Thus,
ldconfig is not used in Darwin, since paths to
linked dynamic shared libraries are included in the executables. On
an ELF system, you typically use ldconfig or set
the LD_LIBRARY_PATH variable. In Darwin, use
DYLD_LIBRARY_PATH instead of
LD_LIBRARY_PATH (see the dyld
man page for more details).