Subject: Re: Shared Libs and executables: How?
To: None <frank@fwi.uva.nl>
From: Hacksaw <hacksaw@gerbils.fe.com>
List: netbsd-help
Date: 10/27/1996 14:46:52
>Quoting Hacksaw,
>
>> Can someone point me to litereature on how to produce shared
>> libraries, and executables that use shared libraries?
>
>In all cases: read the ld(1) manpage, and another way to do it
>is simply to watch what 'make' does when compiling a library
>in /usr/src/lib (see /usr/share/mk/bsd.lib.mk).
>
>For a.out shared libs, bsd.lib.mk does the following:
>
>	1) compile the source files with -fpic
>	2) bundle them in an archive called libXXX_pic.a
>	3) ld -x -Bshareable -Bforcearchive -o libXXX.so.X.Y libXXX_pic.a

O.K., that produces the libs, but how about the executables to refer
to them?

I have seen a -Bdynamic options for ld, the -shared option for gcc.

These things tend to either complain, or do the wrong thing when I use
them. (The wrong thing being compiling in static libraries).

Thanks
--
Hacksaw