🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6643

Dynamic vs Static Linking of X11 Code on Sun Sparc

#6643
From: George W. Fleming
Date: Wed, 23 Jan 1991 20:47
24 lines
1559 bytes
I have a Sun Sparc running OS 4.1.1, with X11R4 (PL18) and Motif 1.1.  The
X11 system was built to provide shared libraries...

I've noticed that some X11/Motif codes that I write would occasionally
produce the following error:

  ld.so:  Undefined Symbol:  __XtInherit

I don't know why it is using XtInherit in the first place.  When I look in
the source code of X11, I noticed a comment in there that says that
XtInherit should be linked statically.  So I tried it with the -Bstatic
option.  Sure enough, it worked!

Of course I don't know what made it to work since I don't understand the
difference between static and dynamic linking.  Could someone shed me some
light on this?  Since I don't understand it, I don't know if all my
X11/Motif codes should be compiled with the -Bstatic option.  If not, how
do I know when XtInherit will be referenced?

If the library is shared, why do I need to make it static?  Any info would
be appreciated.

George W. Fleming
gwf@sapphire.bellcore.com
Technical Details
Message-ID: <1391@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: gwf@sapphire.bellcore.com (George W. Fleming)
Newsgroups: comp.sys.sun
Subject: Dynamic vs Static Linking of X11 Code on Sun Sparc
Keywords: Windows
Message-ID: <1391@brchh104.bnr.ca>
Date: 23 Jan 91 20:47:43 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 24
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 10, Issue 17, message 17
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu