Article View: gnu.gcc.help
Article #50265static vs dynamic loading
From: Michael Helm
Date: Sun, 07 Nov 1993 17:47
Date: Sun, 07 Nov 1993 17:47
22 lines
1587 bytes
1587 bytes
Environment: SunOS4.1.(Mostly 3), gcc-2.5.2 Once in a while I need to mix static & dynamic libraries when linking an executable. For example, there's the well-known case of the broken dynamic libXaw in Openwindows. I've also needed to go back & forth with some of my own experiments in making libraries. I can't remember how to do this with gcc, or else it doesn't work at this revision; it's not something I do often enuf to be confident I really remember the procedure. The gnu gcc option "-static" works but seems to point the linker exclusively to static libraries, ie it doesn't work in-line like Sun's "-Bstatic" option does. Trying to in-line Sun -Bstatic -lfoo -Bdynamic with the gnu gcc form -Wl,-Bstatic -lfoo -Wl,-Bdynamic results in the static/dynamic options being resorted & pulled to the beginning of the call to "ld" -- they no longer wrap the library where they need to be. This seems like a bug to me. Does anyone know a way to do this with gcc? Any comments? Thanks. --
Technical Details
Message-ID:
<35345@dog.ee.lbl.gov>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!overload.lbl.gov!dog.ee.lbl.gov!fionn.lbl.gov!mikeShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,4f6dc4ea7ac37666,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-11-07 09:48:59 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!overload.lbl.gov!dog.ee.lbl.gov!fionn.lbl.gov!mike From: mike@fionn.lbl.gov (Michael Helm) Newsgroups: gnu.gcc.help Subject: static vs dynamic loading Date: 7 Nov 1993 17:47:40 GMT Organization: N.I.C.E. Lines: 25 Message-ID: <35345@dog.ee.lbl.gov> Reply-To: mike@fionn.lbl.gov (Michael Helm) NNTP-Posting-Host: 128.3.128.60