Building and linking shared libaries for multipledifferentversions
vorlon at netexpress.net
Wed May 16 15:03:00 GMT 2001
On Thu, 17 May 2001, Richard Sharpe wrote:
> >> OK, but when it comes to installing the shared library, it seems that I
> >> have to copy the library as libsmbclient.so.1.0 or something like that.
> >> Later ldconfig will create a link from libsmbclient.so.1 to the name above,
> >> but for any linking with that library to work, it seems that I also need a
> >> link from libsmbclien.so to libsmbclient.so.1 ...
> > Yes: This is really a convention, used to allow easy
> > updates. We create libFoo.so.93 and link it to libFoo.so
> > When we upgrade, we leave 93 in place, add 94
> > and link 94 to libFoo.so
> > If an existing program needs version libFoo.so.93, it can get it,
> > but by default it just uses libFoo.so as the thing to link
> > to. Does that help?
> OK, great explanation. What action do I need to take when I install
> Do I need to run ldconfig, and then create the link if it doesn't already
ldconfig isn't universally used, even on Linux... I think simply creating the
symlinks is the most straightforward way to handle it.
If you're going to have versioned libraries, you'll also need to pass an
option to the linker to specify the versioned soname -- otherwise, programs
which link against the library won't actually know they need libFoo.so.93.
More information about the samba-technical