Building and linking shared libaries for multipledifferentversions of UNIX

David Collier-Brown davecb at canada.sun.com
Wed May 16 14:31:24 GMT 2001


Richard Sharpe wrote:
> 
> At 08:19 AM 5/16/01 -0400, David Collier-Brown wrote:
> >Richard Sharpe wrote:
> 
> >> 2. Can I get away with defining something like SOLDFLAGS, and simply pass
> >> that to $(LD)?
> >
> >       Yes, for Solaris and Linux.
> 
> 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?

-- 
David Collier-Brown,           | Always do right. This will gratify 
Performance & Engineering Team | some people and astonish the rest.
Americas Customer Engineering  |                      -- Mark Twain
(905) 415-2849                 | davecb at canada.sun.com




More information about the samba-technical mailing list