OSLib installation problem
Philip Ludlam
philip at philipnet.com
Sun Jan 19 22:39:11 GMT 2003
On 19 Jan, in message <95256cb74b.Chris at ntlworld.com>
Chris Terran <chris.terranova at ntlworld.com> wrote:
>In message <962a37b74b.Tony at mk-net.demon.co.uk>
> Tony van der Hoff <tony at mk-net.demon.co.uk> wrote:
[snip]
>> Are you specifying #include "oslib/xxxx.h" in your source files?
>
>Yes -- specifically, #include "oslib/osfile.h"
As an aside I use #include <oslib/wimp.h> in my files.
>> If you believe you're doing all that, please give some examples
>> (i.e. not your interpretation) of the sort of error reports you're
>> getting.
>
>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.
>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.
As an aside to Tony: I don't think the file OSLib_readme actually
mentions how to link C programs with OSLib.
[snip]
>It does, and many thanks for taking the time to answer. Perhaps I should
>grit my teeth and start on Makefiles....
They're not all *that* bad. And you can always look at the OSlib
Makefiles for reasonable examples.
Yours,
Phil L.
--
http://www.philipnet.com
More information about the oslib-user
mailing list