Help needed getting started
Dave Lambley
dave at lambley.me.uk
Sun May 17 11:16:47 BST 2020
Hi Michael,
> On May 17, 2020 11:08 AM Michael Gerbracht <m.gerbracht at cityweb.de> wrote:
>
>
> I am trying to get into C/C++ programming on RISC OS. I would like to start
> with writing a small toolbox program using OSLib with Acorn C/C++ DDE using
> shared makefiles. I did get a demo app running using the native wimp and
> toolbox libraries but would now like to use OSLib instead.
>
> Currently I am facing two problems. The first one is compiling. Whenever I
> try to compile it the first time I get the follwoing errors:
>
> cc -c -depend !Depend -IC:,OSLibSupport:,OSLib: -ff -fah -o o.main c.main
> Norcroft RISC OS ARM C vsn 5.82 [03 Apr 2020]
> "C:h.toolbox", line 62: Error: differing redefinition of #define macro TRUE
> "C:h.toolbox", line 63: Error: differing redefinition of #define macro FALSE
> "C:h.toolbox", line 185: Error: differing redefinition of #define macro
> Toolbox_CreateObject
> [and many more similar errors...]
>
> When trying for a second time everything seems ok and the application builds
> - still I think this is not a good thing and I feel I am missing something
> important here.
>
> The second problem is, that the app crashes when I try to start it with an
> "abort on data transfer at 000082E0".
>
> Any help is welcome. I am just starting with C/C++ so I probably make stupid
> mistakes.
>
> I can also attach the code I have (if this is allowed) or upload it
> somewhere. I have looked at the !Dustbin demo app but obviously I am still
> doing something wrong. If there is another example app which uses toolbox +
> OSLib + Shared Makefiles this might also help me to find the error.
I suspect the errors you see aren't errors as such, but merely warnings. It appears to succeed without errors the second time because "make" realises nothing has changed, so does not attempt to recompile.
I think you may be pulling in two header files which conflict. If you can upload the code somewhere, I could take a look. You could copy-paste it in to https://gist.github.com/
All the best,
Dave
More information about the oslib-user
mailing list