https://github.com/jdourlens/FirmataC I am trying to install this to use on Linux mint, but I don't know how to install it to use. I have downloaded the files and included the headers and source files in a "project" in codeblocks, but it doesn't compile, keeps going into more and more includes within the files to not be found. Personally, alot of github projects/folders for libraries I always find it incredibly hard to use or install it on both windows/linux. If its a generic and common way of installing these libraries, how do I do this?
Errors:
main.c:(.text+0x1b): undefined reference to `firmata_new'
/usr/bin/ld: main.c:(.text+0x2d): undefined reference to `firmata_pull'
/usr/bin/ld: main.c:(.text+0x51): undefined reference to `firmata_pinMode'
/usr/bin/ld: main.c:(.text+0x86): undefined reference to `firmata_digitalWrite'
/usr/bin/ld: main.c:(.text+0x9e): undefined reference to `firmata_digitalWrite'
The FirmataC project comes with a
Makefile, which allows you to build the library. To do so, clone the project and runmakein the project directory. Then, you can link to this library when you compile by runninggcc main.c -L <path-to-clone-dir> -I <path-to-clone-dir>/inclues -lfirmatac -o mainwhere ` is the path to which you cloned the FirmataC project.It is also good to note that many
Makefiles (but not this one) will provide amake installcommand, which allows you to install the library on a system level. If you are using a library that allows it, runningmake installallows you to simply dogcc main.c -l<library-name> -o main.