Subject: Re: Making a shared library: how?
To: None <netbsd-help@NetBSD.ORG, P.T.H.Tutelaers@urc.tue.nl>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: netbsd-help
Date: 02/09/1995 10:49:21
> I would appreciate if somebody could explain:
>   a) how to create a shareable library (CFLAGS = -fpic ?)

The basic procedure is this:
	cc -c -fpic x.c y.c
	ld -Bshareable -o libz.so.0.0 x.o y.o

>   b) how to install it in a non-conventional place so that programs
>      can find it (is ldconfig needed or is there another method)
>      and so that users don't have to set LD_LIBRARY_PATH?
> 
Just run `ldconfig [...] /your/lib/dir'. Don't forget to always put
any other directories you may have at the `...'s . ldconfig has no
`incremental mode'. Also, note that `/your/lib/dir' is now a trusted
directory with respect to set[ug]id programs, so check access permissions!

-pk