OSLib help
Martin Avison (27) 1494 posts |
I have a program that I believe uses OSLib, because it has references including OSLib:o.oslib in the Makefile. I can see from object files that it was last compiled using Norcroft C v5.54. I have the latest DDE27, which includes C v5.72, and I have downloaded from http://ro-oslib.sourceforge.net three files: OSLib-aof-7/00/zip, OSLibSupport-aof-7/00/zip, and OSLibStrongHelp-7/00/zip. I know how to use the StrongHelp file, but the other two baffle me, and the C manual seems no help. The answers are probably very obvious, but not to novices with C like me. In OSLib-aof-7/00/zip there is an OSLib_readme file which, under Installation, it says: “Finally, the OSLib directory is what it’s all about; you should copy this to a suitable place on your hard disc; probably in the same place as your other libraries.” Question 1: There is no OSLib directory in the zip: the nearest is the oslib directory. Is that what is being referred to? Question 2: I see it must be copied to ‘the same place as my other Libraries’ – but I have never installed an external library before, so I am unsure where that should be. I can see several ‘Library’ related directories: should it go in !Boot.Library, or AcornC/C++.!SetPaths.Lib32, or AcornC/C++.Export.APCS-32.Lib, or somewhere else ? Question 3: Do I need the the OSLibSupport-aof-7/00/zip? The OSLib_readme file in there is identical to the other one, so the same questions above apply if I do. |
Colin (478) 2433 posts |
If you compile your own roms then just run !builder and it sets up OSLib from the rom sources (if the rom sources have been compiled) |
Jeffrey Lee (213) 6048 posts |
The OSLib and OSLibSupport archives should contain a SetVars obey file which set up OSLib: and OSLibSupport: path variables. So usage is just:
It looks like that part of the readme is out of date. For the SetVars obey file to work, you’ll need both the ‘o’ and ‘oslib’ folders to be in the same place as SetVars itself. So it’s probably best to just copy the entire contents of the archive.
If you see references to OSLibSupport: in the makefile or in your source code then you’ll need it. It’s an optional library that builds ontop of OSLib to provide some extra functionality. |
Martin Avison (27) 1494 posts |
I thought OSLib had nothing to do with the ROMs or ROOL? Are you confusing it (like I did for a very long time) with RISC_OSLib?
So, the zip contents should be copied a new directory OSLib, which can be anywhere. It all makes sense now! We have to beware of RISC_OSLib vs OSLib vs oslib, as well as misleading instructions! |
Colin (478) 2433 posts |
No it is OSLib. Run !builder and
Did you get my email about EtherUSB – I’m not sure that it has got through. |
Martin Avison (27) 1494 posts |
My ignorance, then. So does !Builder just set up OS variablees, or do the ROOL sources contain OSLib in some form? I have never seen any mention of it. But I have never tried building my own ROms. [I have replied re EtherUSB] |
Chris Mahoney (1684) 2165 posts |
But to keep things tidy, you may wish to put it with the other libraries in AcornC/C++.Export.APCS-32.Lib. |
Colin (478) 2433 posts |
It’s compiled with the rom and put in Export.APCS-32.Lib
It’s easy enough to do just a little daunting at first. They should compile straight from the download using !UntarBz2 without changing any options these days. Then it’s just a matter of working out the options in !builder you can unset to speed up recompiling a modification – ie you don’t have to recompile the whole rom every time which can take a while. |