OSLib installation problem

Chris Terran chris.terranova at ntlworld.com
Mon Jan 20 20:28:00 GMT 2003


In message <e97375b74b.philip at philipnet.com>
          Philip Ludlam <philip at philipnet.com> wrote:

> On 19 Jan, in message <95256cb74b.Chris at ntlworld.com>
>   Chris Terran <chris.terranova at ntlworld.com> wrote:
>
> As an aside I use #include <oslib/wimp.h> in my files.

Why, if you don't mind me asking? I'm not using any wimp calls ATM (that
comes later...).

> >I was trying to use the osfile_set_type function. I included
> >"oslib/osfile.h", and appended -IOSLib: to the command line menu entry
> >(can this be automated?). Compilation proceeded,
> 
> Which means that cc managed to find and include the OSLib header files
> you specified.

Thanks for confirming that.

> >but the linker gives the error:
> >
> >(Error) Undefined symbol(s).
> >    osfile_set_type, referred to from o.main.
> >Errors in link, no output generated.
> 
> Which means that you need to link with the object file OSlib:o.OSLib32
> as long as you're using Castle's new compiler tools (with the default
> apcs-32-bit setting). If you're using the Acorn one then
> you need to link with OSLib:o.OSLib
> 
> As you're using the CC front end you need to add the relevant library
> object file to 'Libraries' submenu.

Philip, thanks very much -- the light is dawning. I'm obviously a bit
unclear on how all the tools join together; and was assuming that once
you'd specified a library the rest was automatic.

Anyway, it works now, and many thanks!

Well, apart from running into a 'Command line too long' error from the
front end, although it compiles and runs OK. It looks like I'm running
into the limitations of the front end, and will indeed have to start on
Make files, which I suspect will clear up such problems.

> As an aside to Tony: I don't think the file OSLib_readme actually
> mentions how to link C programs with OSLib.

Yes, it was the linking step that was the problem.

[snip]

[Makefiles]

> They're not all *that* bad. And you can always look at the OSlib
> Makefiles for reasonable examples.

One problem I've already run across is that there appears to be a number
of incompatible formats of makefiles, all with the same filetype....

Thanks again for the help -- much appreciated.

Best, Chris

-- 
*** Chris & Lee's Photodesk tutorials, tips and resources:
>>> http://www.photodesk.iconbar.com  @@@ photodesk at iconbar.com




More information about the oslib-user mailing list