I would like to use the pencil library in my own project. Unfortunately I
do not know how to comile it as I do not have experience with C
programming (I know a few things but never compiled anything major by
myself). I saw that there is a makefile included but this seems to be for
GCC SDK on unix like systems. But I hope that I can compile it using gcc
on RISC OS
What I did:
- Download the source code of the library
- Installed gcc and tested it with the "hello world" example - it compiled
- I made a new directory, set it as work directory
- added "c" and "h" directories, copied the files into it and removed
/c and /h ending
- trying to compile with: "gcc pencil_build.c -o penciltest"
- got error messages about missing files, solved that by:
- adding the oslib directory from !NSTools
- adding missing "types" file from downloaded OSLib archive
- changed os file: "oslib/types.h" --> "types.h"
- changed os file: "oslib/oscore32.h" --> "oscore.h"
I think that it is not a good idea to changes the files of the library but
from the error messages I got gcc was unable to find the files. After
changing them the files were found. But now I am stuck with it at the
*gcc pencil_build.c -o penciltest
pencil_build.c: In function `pencil_free_item':
pencil_build.c:214: error: 'for' loop initial declaration used outside C99
pencil_build.c: In function `pencil_dump_item':
pencil_build.c:234: error: 'for' loop initial declaration used outside C99
pencil_build.c:250: error: 'for' loop initial declaration used outside C99
pencil_build.c:269: error: 'for' loop initial declaration used outside C99
Would be very nice if somebody could help me. If this is only the tip of
the iceberg of problems and somebody has a compiled version of the library
this is also fine for me.
Thank you very much,
Show replies by date