*BSD News Article 94770


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!cs.utexas.edu!data.ramona.vix.com!nnrp1.crl.com!not-for-mail
From: "Jordan K. Hubbard" <jkh@FreeBSD.org>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Help: Shared Libs
Date: Wed, 30 Apr 1997 03:14:04 -0700
Organization: Walnut Creek CDROM
Lines: 15
Message-ID: <33671B6C.1CFBAE39@FreeBSD.org>
References: <5k5s03$f38$1@nnrp.cs.ubc.ca>
NNTP-Posting-Host: time.cdrom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.2-STABLE i386)
To: Henry Avatar Chan <q8e192@ugrad.cs.ubc.ca>
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:40005


Henry Avatar Chan wrote:
> How do I make a .so (shared dynamic lib) out of them?

ld -Bsharable *.o -o foo.so.0.0

> Do these .o files have to be compiled with -fPIC?

Yes (or -fpic).

> Any full examples of creating shared libs are appreciated.

/usr/src/lib :-)
-- 
- Jordan Hubbard
  FreeBSD core team / Walnut Creek CDROM.