Building and linking shared libaries for multipledifferentversionsof UNIX

Michael Sweet mike at
Wed May 16 17:31:35 GMT 2001

Steve Langasek wrote:
> ...
> 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

What we do is to link the DSO with the version number, e.g.:

    cc -shared -o *.o

(this is a ficticious command, of course)

Then you make the symlink to .so (so the linker can find the DSO
when you link the other apps), but the soname used is "".
This isn't universally supported, so there is an added -soname (or
whatever) in the DSO link on some platforms, but that is the basic

Michael Sweet, Easy Software Products                  mike at
Printing Software for UNIX             

More information about the samba-technical mailing list