🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2218

Re: NXBundles and external libraries

#2218
From: Ed Nicolson
Date: Thu, 21 Jan 1993 18:41
46 lines
2523 bytes
In article <PFKEB.93Jan20214908@kaon.SLAC.Stanford.EDU>  
pfkeb@kaon.SLAC.Stanford.EDU (Paul F. Kunz) writes:
>    I would appreciate advice on how to best handle the following 
> situation...
> 
>    I have a large body of code with nibs which I've encapsulated in to
> a NXBundle.  The code makes calls to an external library package.  The
> purpose of the bundle is so that a number of other applications can
> load this bundle rather than compiling and linking their own copies of
> the source code.  These other applications also link against the same
> external library, but far fewer members of the library.
> 
I have a similar question.  When distributing a custom Palette I
need to distribute a library of the object code along with the
Palette, which I believe is a bundle.   The Palette contains my
custom subclass of IBPalette (MyIBPalette) along with other classes I have
created.  The palette (bundle) also contains nib and tiff files
that the other classes need.  To get those resources I use 

bundle = [NXBundle bundleForClass: [MyIBPalette class]];
[bundle getpath:buf forResource .....]

in the code for the other classes.

To create the library I took all the object code files from the 
   palette and used ar and ranlib to create a library which I link in 
   with the application using the custom Palette.  This gives the message:

/bin/ld: Undefined symbols:
objc_class_name_IBInspector
_IBObjectPboardType
objc_class_name_IBPalette

Questions:

a) Is there another library other than the standard -lMedia_s -lNeXT_s
   that could be linked to solve this problem (I could not find one.)

b) Should I not be using the class MyIBPalette to be the class 
   "holding" the bundle for all the custom palette resources since
    the application will not require the IBInspectors and IBPalette
    classes during execution.  It only needs them when running
    Interface Builder.

Ed Nicolson
nicolson@robotics.berkeley.edu
Technical Details
Message-ID: <1993Jan21.184110.19517@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!pasteur!nntp
References: <PFKEB.93Jan20214908@kaon.SLAC.Stanford.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!pasteur!nntp
From: nicolson@strauss.berkeley.edu (Ed Nicolson)
Subject: Re: NXBundles and external libraries
Message-ID: <1993Jan21.184110.19517@pasteur.Berkeley.EDU>
Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
Nntp-Posting-Host: strauss.berkeley.edu
Reply-To: nicolson@robotics.berkeley.edu
Organization: University of California, at Berkeley
References: <PFKEB.93Jan20214908@kaon.SLAC.Stanford.EDU>
Date: Thu, 21 Jan 1993 18:41:10 GMT
Lines: 46