From owner-freebsd-hackers Sat Dec 6 16:12:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA26888 for hackers-outgoing; Sat, 6 Dec 1997 16:12:57 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from freebsd1.cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA26869; Sat, 6 Dec 1997 16:12:41 -0800 (PST) (envelope-from jb@freebsd1.cimlogic.com.au) Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.8.5/8.8.5) id LAA01594; Sun, 7 Dec 1997 11:15:42 +1100 (EST) From: John Birrell Message-Id: <199712070015.LAA01594@freebsd1.cimlogic.com.au> Subject: Re: shared library with static Motif? In-Reply-To: <199712062317.QAA06878@mt.sri.com> from Nate Williams at "Dec 6, 97 04:17:06 pm" To: nate@mt.sri.com (Nate Williams) Date: Sun, 7 Dec 1997 11:15:41 +1100 (EST) Cc: tlambert@primenet.com, jkh@time.cdrom.com, mike@smith.net.au, hsu@FreeBSD.ORG, hackers@hub.freebsd.org X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Nate Williams wrote: > But, aside from legalities the real issue hasn't been answered. Is it > *technically* possible to link in a 'static' library into a 'shared' > library so that the end-user doesn't need a Motif library to get access > to the shared library? Yes (I think 8-). You still use ld -Bshareable so that you get a shared object, but you list the Motif static libraries with the objects that you link into your shared library. The linker (should) then resolve all Motif references in your shared library, leaving the X11 ones as external references to the X shared libraries. Just don't use the -l option to search for libraries because ld will try to translate these to shared libraries. Use an explicit reference like /usr/lib/X11/libXm.a > > > Nate > Regards, -- John Birrell - jb@cimlogic.com.au; jb@netbsd.org; jb@freebsd.org CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137