From owner-freebsd-hackers Sat Dec 6 16:19:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA27545 for hackers-outgoing; Sat, 6 Dec 1997 16:19:31 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: (from hsu@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA27468; Sat, 6 Dec 1997 16:18:59 -0800 (PST) (envelope-from hsu) Date: Sat, 6 Dec 1997 16:18:59 -0800 (PST) From: Jeffrey Hsu Message-Id: <199712070018.QAA27468@hub.freebsd.org> To: jb@freebsd1.cimlogic.com.au Subject: Re: shared library with static Motif? Cc: hackers@hub.freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > 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 I tried that. You get the dreaded RSS relocation error messages because the routines in libXm.a weren't meant to be used in a shared library.