[openbeos] Re: static libs for drivers

  • From: François Revol <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sat, 17 May 2003 16:23:16 +0200 (CEST)

En réponse à Waldemar Kornewald <Waldemar.Kornewald@xxxxxx>:

> > "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> > > Hi,
> > > how can I produce a static lib in order to link my kernel drivers/
> > > modules
> > > against it?
> > > Is there some Jamfile function for this in the OBOS tree?
> >
> > Yep, the astonishingly accurately named rule StaticLibrary. ;-)
> >
> > Usage: StaticLibrary <name_without_lib_and_extension> : <sources> ;
> 
> Really? :))
> I thought there must be some settings like disabling templates and
> exceptions for drivers. How does the linker remove this code?
> Can I really link my drivers against any static library?
> 
Static libs are nothing more than a collection of .o files
(an _ar_chive), the lib itself isn't linked to anything else.
That's why if your lib uses libfoobar, you have to link the prog 
itself with libfoobar, unlike dynamic libs, which are themselves linked.

François.

Other related posts: