C Module include problem
Jesse de Waard (2620) 5 posts |
Hello guys, I am making a riscos c module build around the skeleton module ‘examplemod’. I can’t figure out how to include it as i always get the error: ‘Serious error: #include file “services.h” wouldn’t open’. Can any one please help me on how to include this and the other files in the folder “Export.APCS-32.C.Global.h”? Thanks |
GavinWraith (26) 1563 posts |
You do not say which C compiler you are using. I suspect that the answer may depend on which. |
Colin (478) 2433 posts |
should just work – it does for me and I haven’t made a change to the makefile to make it work. |
Rick Murray (539) 13840 posts |
Colin, I’m guessing you are using GCC? For the DDE, I can get it to work with:
I can’t help but think there ought to be a simpler way, but looking at the system variables, I can’t see anything else pointing to that location… |
Colin (478) 2433 posts |
Nope I’m using the latest DDE |
Jesse de Waard (2620) 5 posts |
Thanks for the quick replies. I use the c compiler supplied with NutPi, DDE version 25. If i include “global/services.h” it gives the same error: ‘Serious error: #include file “global/services.h” wouldn’t open’. I can however include any of the library’s, for example RISC_OSLib and then use os.h. |
Rick Murray (539) 13840 posts |
OMG…
What did I do? I pressed How to build the module correctly? Double-click on the MkRAM file. <sigh> |
Colin (478) 2433 posts |
It turns out it’s because if you compile after AcornC/C++.!SetPaths has been seen ‘Export.APCS-32.C.’ is not in C$Path but if you use !builder to set C$path – like I do – then it is included in C$path and “global/services.h” works. So either add it to C$path – would be nice if ROOL did this – or if you use !builder use that. |
Jesse de Waard (2620) 5 posts |
Colin what do you mean with !builder? I see -builder !Builder in the parameters of cc so i guess i already use it? Let me try to set add Export.APCS-32.C to the path anyway. |
Colin (478) 2433 posts |
Forget about !builder – you’d know if you used it. |
Colin (478) 2433 posts |
Most impressed that your editor knows which flags you want to call makefile with. |
Jesse de Waard (2620) 5 posts |
Oke i will forget about it than :). Thanks for the help. |
Steve Pampling (1551) 8170 posts |
Ah, the joy of not having a < SourceDirectory >.Resources.UK.Messages file or a line in the Makefile that reads RES_OBJ ="" or indeed points to wherever the Messages file lives. Me, novice, run builder to setup everything that needs to be used1 then either do a quirky command line with interesting syntax or run the !MkRAM file (or modified clone of same for slightly altered syntax) 1 Mostly because then I can use build setups that are rather like stuff in the ROM/HardDisc builds and I don’t have to learn the quirks of the sytem while trying to learn the programming. |