RISC_OSLib
Keith Sloan (1493) 32 posts |
I am trying to compile some very old 26bit RISC OS applications as 32bit with gcc on RISC OS 5.19. The old applications use the RISC_OSLib include and object library. I found http://ro-oslib.sourceforge.net/index.html but this library does not appear to be the same. I assume that at some stage ROOL must have ported the inbuilt rom apps so I assumed the RISC_OSLib would be available. |
Paul Nolan (1470) 18 posts |
It’s part of the DDE. There’s a version up for download on ROL’s site here – don’t know whether it works with GCC though. |
Andrew Rawnsley (492) 1445 posts |
As Paul says, it was part of Acorn’s C tools (and one of the main reasons I suggested the ROOL CD previously). However, if you don’t mind searching around, you may find source/libraries in the RISC OS Open CVS as a number of RISC OS standard apps (Draw, Paint, Edit) use RISC_OSLib extensively. |
Keith Sloan (1493) 32 posts |
I tried the version suggested by Paul, but gcc linker did not like the library. Okay I coffed up ROOL CD had loads of problems as RPCEmu v0.8.9 under Ubuntu does not see the CDROM using host or iso option ( See separate thread ). Okay when I got it installed, tried to compile my old application, by starting !CC. Have to say this is becoming very frustrating and that I have wasted over £50 ( £40 Dev CD and £10 USB stick) |
Trevor Johnson (329) 1645 posts |
If you’re in the UK, is there a user group you could get to? |
Keith Sloan (1493) 32 posts |
In UK, but no local user group as far as I know. Live near Winchester |
Andrew Rawnsley (492) 1445 posts |
(Note – I didn’t think the below info would be necessary with a fresh install of the C tools, because I have a messy custom setup, but now I suspect it may be of some use) When I’m using RISC_OSLib (which I still use extensively in my own custom version), I tend to alter the library/path stuff in !SetPaths in the AcornC/C++ folder. By default, there may be some overlap in header file names between RISC_OSLib and the Toolbox stuff. As such, I recommend creating a replace !SetPaths called !OldPaths (my name for it), and minimising the run file so that C$path only includes the folders for the libraries that you need – Set C$Path <Obey$Dir>.^.Libraries.CLib.,<Obey$Dir>.^.Libraries.RISC_OSLib. This should ensure that C$Path just refers to the correct libraries for old apps, and therefore standard libraries/headers will be found correctly. Finally, I recommend using simple AMU makefiles rather than manually using !CC, but if you did it via !CC back in the day, that should work too. I always have obey files which manually call amu to run my makefile in either single tasking or task window mode. That is, however, personal preference. Failing that, email me some code and I’ll gladly compile it for you against one of my versions of RISC_OSLib. |
Keith Sloan (1493) 32 posts |
Andrew From memory I use Norcroft prior to any !CC just command line and I use to use own !Make Okay using !AMU and a new Makefile I got it to compile, but not link so have something wrong with specifying library in Makefile. Any chance you could email me a working Makefile keith[at]sloan-home.co.uk Thanks |
Trevor Johnson (329) 1645 posts |
Then you may be able to get to the Southampton Acorn Users Group. :-) |
Bryan Hogan (339) 593 posts |
Potentially within range of ROUGOL too – fast trains from Winchester to London Waterloo take just under an hour, then it’s only 10 minutes to the Blue Eyed Maid. Although I’m not sure we have any Norcroft C experts :-( But we do have RPCemu experts :-) |
Dave Higton (281) 668 posts |
If only I could get Neil Spellings to update my e-mail address on aaug.net… I’ve asked him twice, and each time he did nothing. Keith, there is a meeting of SAUG on Wednesday May 9th. Please feel free to e-mail me about the SAUG meeting (I can put you on our mailing list, if you like, so you’ll get a reminder every month – there is almost no other traffic) and about your current problem; I’ll do my best to help. Address is davehigton at dsl dot pipex dot com. |
Keith Sloan (1493) 32 posts |
Okay I have it now compiling but things have obviously changed since I originally wrote the code. I have wimpt_init(“WinShell”); And the template_init call barfs with The !Run file has set <WinShell$Dir> <Obey$Dir> And this used to work a long time ago. Don’t suppose the documentation for RISC_OSLib is available as a PDF anywhere.I am pretty sure I threw my copy out a while ago, thinking I would not need it ever again. User groups are too far to travel, I am retired living on a tight pension so cannot afford the petrol or rail fare. |
Martin Bazley (331) 379 posts |
That error means it tried to load from a filename of the form WinShell:pathname.leafname, which requires the variable <WinShell$Path> to be defined. <WinShell$Dir> won’t do. Try adding this to your !Run file:
Don’t forget the full stop at the end! |
Keith Sloan (1493) 32 posts |
Hi Martin Many Many Thanks. Worked just fine, but without the full stop, With a full stop it complained cos it made the name up with a double dot. Keith |
Trevor Johnson (329) 1645 posts |
Or is this a double bluff? ;-) |
Andrew Rawnsley (492) 1445 posts |
Glad this is sorted :) Very odd that template_init() needs a path variable set, though, as it never has historically. The lack of a fullstop is even more wierd, as it suggests that the library is looking for WinShell:.templates which is down right bizarre syntax. One could just about understand WinShell:Templates… I think I may drop you an email (if I have time – easier if people write to me!) just to ensure you have code compiled against a “sane” build of the library! |