From owner-freebsd-questions Wed Nov 26 12:00:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA14859 for questions-outgoing; Wed, 26 Nov 1997 12:00:46 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id MAA14851 for ; Wed, 26 Nov 1997 12:00:41 -0800 (PST) (envelope-from dyson@freebsd.org) Received: (qmail 16004 invoked from network); 26 Nov 1997 20:00:24 -0000 Received: from dyson.iquest.net (HELO freebsd.org) (198.70.144.127) by 209.43.20.203 with SMTP; 26 Nov 1997 20:00:24 -0000 Message-ID: <347C7FC5.5372FD3C@freebsd.org> Date: Wed, 26 Nov 1997 20:00:05 +0000 From: "John S. Dyson" X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Kwang-Soo Kim CC: freebsd-questions@FreeBSD.ORG Subject: Re: How to build a shared library... References: <199711261916.OAA28859@handel.cs.unc.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Kwang-Soo Kim wrote: > How to build shared library on FreeBSD? > I tried "-fPIC" and "-shared" options with "gcc" without any luck. > > % gcc -I/usr/local/jdk1.1/include -fPIC -c AudioInFBSD.c > % gcc -shared AudioInFBSD.o -o libAudioIn.so > ld: No reference to __DYNAMIC > > Thanks for any tip. > Kwang-Soo Kim Try gcc -Bshareable instead of -shared. John