*BSD News Article 94130


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news.apfel.de!univ-lyon1.fr!fdn.fr!r2d2.fdn.org!sphynx.fdn.fr!causse
From: causse@sphynx.fdn.fr (Philippe Causse)
Subject: Re: From .a to .so
X-Newsreader: TIN [version 1.2 PL2]
Organization: individual - paris - france
Message-ID: <E90G4G.1xt@sphynx.fdn.fr>
References: <5jgm21$bet$2@nnrp.cs.ubc.ca>
Date: Mon, 21 Apr 1997 23:05:04 GMT
Lines: 30
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39497


Henry Avatar Chan (q8e192@ugrad.cs.ubc.ca) wrote:
: This is my limited understanding of dynamic libs:

: 1) they end with a .so
: 2) one can specify their path via LD_LIBRARY_PATH

: my question is: How do I make a shared/dynamic library given
: a file that ends with a .a?
: (BTW are shared and dynamic synonyms)
You cannot. This is not the same object code => you need the source.
Code put in ".so" files has been compiled in "position independent" mode,
using "gcc -fpic".
Look in  /usr/share/mk/bsd.lib.mk for a comprehensive list of options.
BTW, this makefile is quite handy if you want to build you own shared libs...

SRCS = list of sources
LIB = name of lib (without extension)
SHLIB_MAJOR = 1
SHLIB_MINOR = 0
.include <bsd.lib.mk>


: thx,
: Henry Chan
: q8e192@ugrad.cs.ubc.ca
: Free BSD2.1.0
-- 
-------------------------------------------------------------------
P. Causse			http://www.fdn.fr/~pcausse
4.4BSD/X11R6/Motif-2.0/C++	mailto:causse@sphynx.fdn.fr (UUCP)