Article View: comp.sys.next.programmer
Article #2268Re: NXBundles and external libraries
From: Paul F. Kunz
Date: Sat, 23 Jan 1993 04:28
Date: Sat, 23 Jan 1993 04:28
40 lines
2218 bytes
2218 bytes
After a day of puting out fires in other areas, I came back to this problem and it turned out quite easy. The problem was that a dynamically loaded bundle and the staticly loaded code in an application resolved external symbols from the same external non-NeXT C library where the bundle needed many more symbols than the application. Here's what I did... In Makefile.preamble of the application, I put in LLIBS = /usr/local/lib OTHER_OFILES = obj/hippo.o LIBHIPPO = $(LLIBS)/libhippoNext.a where libhippoNext.a is the C library in question. In Makefile.postamble of the applicaton, I put in obj/hippo.o : $(LIBHIPPO) ld -all_load -r -o $@ $(LIBHIPPO) This dependency rule forces all of libhippoNeXT.a to be linked re-locateable into the file obj/hippo.o and since obj/hippo.o has been declared as an "OTHER_OFILE" everything works. That is, the application links without errors due to unresolved sysmbols, and the bundle loads also without errors due to unresolved symbols. Obviously, this is a good solution only if you essentially need all of the library in the application anyway, which is my case. The real answer to the problem is to build a shared library, but nobody but a few gurus at NeXT know how to build a shared library on a NeXT. I have nobody to thank for suggestions or solutions to my question since I didn't get any via the news group nor by e-mail. This must be one of the rare cases where the net didn't come thru. -- Paul F. Kunz pfkeb@slac.stanford.edu (NeXT mail ok) Stanford Linear Accelerator Center, Stanford University Voice: (415) 926-2884 (NeXT) Fax: (415) 926-3587
Technical Details
Message-ID:
<PFKEB.93Jan22202833@kaon.SLAC.Stanford.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!unixhub!kaon.SLAC.Stanford.EDU!pfkebReferences:
<PFKEB.93Jan20214908@kaon.SLAC.Stanford.EDU>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!unixhub!kaon.SLAC.Stanford.EDU!pfkeb From: pfkeb@kaon.SLAC.Stanford.EDU (Paul F. Kunz) Subject: Re: NXBundles and external libraries In-Reply-To: pfkeb@kaon.SLAC.Stanford.EDU's message of Thu, 21 Jan 1993 05:49:11 GMT Message-ID: <PFKEB.93Jan22202833@kaon.SLAC.Stanford.EDU> Lines: 40 Sender: news@unixhub.SLAC.Stanford.EDU Organization: Stanford Linear Accelerator Center References: <PFKEB.93Jan20214908@kaon.SLAC.Stanford.EDU> Date: Sat, 23 Jan 1993 04:28:37 GMT