Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 1997 11:15:41 +1100 (EST)
From:      John Birrell  <jb@freebsd1.cimlogic.com.au>
To:        nate@mt.sri.com (Nate Williams)
Cc:        tlambert@primenet.com, jkh@time.cdrom.com, mike@smith.net.au, hsu@FreeBSD.ORG, hackers@hub.freebsd.org
Subject:   Re: shared library with static Motif?
Message-ID:  <199712070015.LAA01594@freebsd1.cimlogic.com.au>
In-Reply-To: <199712062317.QAA06878@mt.sri.com> from Nate Williams at "Dec 6, 97 04:17:06 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712070015.LAA01594>