home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!sdd.hp.com!scd.hp.com!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!mjs
- From: mjs@hpfcso.FC.HP.COM (Marc Sabatella)
- Newsgroups: comp.sys.hp
- Subject: Re: Motif and regcmp
- Message-ID: <7371306@hpfcso.FC.HP.COM>
- Date: 11 Sep 92 20:37:54 GMT
- References: <5476@dove.nist.gov>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Lines: 43
-
- In comp.sys.hp, fein@epg.nist.gov (Aaron Fein) writes:
-
- > I was able to successfully compile and link a Motif application, but when I
- > run it I get a message saying "Unable to resolve regcmp (code)..." (Why
- > wasn't this caught by the linker?)
-
- Shared libraries make this type of determination more difficult. Sun is overly
- aggressive, complaining about missing routines referenced anywhere in any
- shared library, needed or not; HP-UX on the 700 and 800 series is overly
- conservative, not complaining about some routines by shared libraries. The
- 300/400 linker tries its best to give the right answers, but it can probably be
- fooled in either direction by a wicked enough programmer. A surprisingly nasty
- problem, actually.
-
- > So I added in the PW library in the link.
- > The link failed with a message about unsatisfied symbols: free and write.
- > I am trying to figure out in what library free and write are located and
- > why are they no longer found once I add the PW library in the link.
- >
- > I have tried -lc -lPw -lc as suggested and this did not link either.
-
- Sounds similar to another problem posted on yesterday - see if you can find my
- response. "free" and "write" are indeed in libc, but apparently the linker
- thinks it doesn't need them the first time it searches the library, and doesn't
- bother looking again. My suggestion (which was lacking in my response to the
- other related problem): try "-Wl,-a,archive" after the "-lc -lPW". The second
- "-lc" is unnecessary; the compiler inserts that for you. If the linker does
- ignore repeated shared libraries, then the trick is probably to specify the
- archive form for one or the other. If you have problems with
-
- -lc -lPW -Wl,-a,archive
-
- try
-
- -Wl,-a,archive -lc -Wl,-a,default -lPW
-
- which will search archive libc the first time instead of the second.
-
- --------------
- Marc Sabatella (marc@hpmonk.fc.hp.com)
- Disclaimers:
- 2 + 2 = 3, for suitably small values of 2
- Bill (H.) and Dave (P.) may not always agree with me
-