Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #742 > unrolled thread

Building a library

Started byAlan Wrigley <alan@alanwrigley.com>
First post2011-09-19 17:23 +0100
Last post2011-09-20 11:42 +0100
Articles 6 — 5 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  Building a library Alan Wrigley <alan@alanwrigley.com> - 2011-09-19 17:23 +0100
    Re: Building a library druck <news@druck.org.uk> - 2011-09-19 18:56 +0100
      Re: Building a library Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> - 2011-09-19 22:43 +0100
        Re: Building a library Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-09-19 23:14 +0100
          Re: Building a library Martin Wuerthner <spamtrap@mw-software.com> - 2011-09-20 01:21 +0200
            Re: Building a library Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> - 2011-09-20 11:42 +0100

#742 — Building a library

FromAlan Wrigley <alan@alanwrigley.com>
Date2011-09-19 17:23 +0100
SubjectBuilding a library
Message-ID<gemini.lrs2vh00fewdd0144.alan@alanwrigley.com>
I've not built a library before, and the Acorn docs don't seem to cover what
I want to know.

If my library makes calls to another library, e.g. RISC_OSLib, do I include
that library in the list of members for LibFile, or is it down to the
application that uses my library to link with it as well as mine?

Alan

[toc] | [next] | [standalone]


#744

Fromdruck <news@druck.org.uk>
Date2011-09-19 18:56 +0100
Message-ID<j57vol$9qu$1@dont-email.me>
In reply to#742
On 19/09/2011 17:23, Alan Wrigley wrote:
> I've not built a library before, and the Acorn docs don't seem to cover what
> I want to know.
>
> If my library makes calls to another library, e.g. RISC_OSLib, do I include
> that library in the list of members for LibFile, or is it down to the
> application that uses my library to link with it as well as mine?

No. Your library just contains your object files, it's up to the linker 
to pull in all the dependencies both from both the program and each library.

---druck

[toc] | [prev] | [next] | [standalone]


#745

FromAlan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk>
Date2011-09-19 22:43 +0100
Message-ID<gemini.lrshnp00qtkia0144.spamhater@keepyourfilthyspamtoyourself.co.uk>
In reply to#744
druck <news@druck.org.uk> wrote:

> On 19/09/2011 17:23, Alan Wrigley wrote:
> >
> > If my library makes calls to another library, e.g. RISC_OSLib, do I
include
> > that library in the list of members for LibFile, or is it down to the
> > application that uses my library to link with it as well as mine?
> 
> No. Your library just contains your object files, it's up to the linker 
> to pull in all the dependencies both from both the program and each
library.

Thanks for that. One of the reasons I asked is because I'm having a weird
problem. I'm trying to build an old library of Neil Raine's which uses
RISCOSLib. The library builds just fine, but when I build the app which uses
it, and link with both Neil's library and RISCOSLib, the linker tells me it
doesn't have a symbol for visdelay_percent. Now this is a standard part of
RISCOSLib, and every other function the library calls in RISCOSLib has a
symbol, so why not this one?

Interestingly when I replace RISCOSLib with RLibSmall (which I think was
Neil's cut-down version of RISCOSLib), there's no problem with
visdelay_percent but this time there's no symbol for bbc_rectangle (which
does exist in RLibSmall).

Does this make sense to anyone? It doesn't to me.

Alan

-- 
RISC OS - you know it makes cents

[toc] | [prev] | [next] | [standalone]


#746

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2011-09-19 23:14 +0100
Message-ID<QYm*1+ENt@news.chiark.greenend.org.uk>
In reply to#745
Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> wrote:
> Interestingly when I replace RISCOSLib with RLibSmall (which I think was
> Neil's cut-down version of RISCOSLib), there's no problem with
> visdelay_percent but this time there's no symbol for bbc_rectangle (which
> does exist in RLibSmall).
> 
> Does this make sense to anyone? It doesn't to me.

ISTR that the order of the libraries on the 'link' command line was
important.  I never figured out the mechanism behind it (it was something
like link not forward-searching for dependencies), but usually including the
library more than once in the list (at the beginning and at the end, say)
did the trick.

Theo

[toc] | [prev] | [next] | [standalone]


#747

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-09-20 01:21 +0200
Message-ID<681b661552.martin@bach.planiverse.com>
In reply to#746
In message <QYm*1+ENt@news.chiark.greenend.org.uk>
          Theo Markettos <theom+news@chiark.greenend.org.uk> wrote:

> Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> wrote:
>> Interestingly when I replace RISCOSLib with RLibSmall (which I think was
>> Neil's cut-down version of RISCOSLib), there's no problem with
>> visdelay_percent but this time there's no symbol for bbc_rectangle (which
>> does exist in RLibSmall).
>> 
>> Does this make sense to anyone? It doesn't to me.

> ISTR that the order of the libraries on the 'link' command line was
> important.  I never figured out the mechanism behind it (it was something
> like link not forward-searching for dependencies), but usually including the
> library more than once in the list (at the beginning and at the end, say)
> did the trick.

Or, more easily, specifying the "-rescan" link option.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#748

FromAlan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk>
Date2011-09-20 11:42 +0100
Message-ID<gemini.lrthra006s5d70210.spamhater@keepyourfilthyspamtoyourself.co.uk>
In reply to#747
Martin Wuerthner <spamtrap@mw-software.com> wrote:

> Or, more easily, specifying the "-rescan" link option.

Thanks Martin, this seems to have done the trick.

Alan

-- 
RISC OS - you know it makes cents

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web