I’ve read about every docs page and community post I can find on local libraries and their structure and how to use them in Workbench but the picture is still unclear to me as to what Workbench is expecting in order to compile local libraries. Usually the answer to others questions is “Create a demo project and copy the structure” but sometimes that’s just not possible when wanting to bring in pre-existing libraries and it appears that my library is already following that structure but I’m still facing an error.
Currently I understand the following must be true:
- Libraries must be within their own folder in the “libs” or “libraries” folder of a project
- Libraries must have a libraries.properties file
- Libraries must have their .h and .cpp files within an “src” folder inside the library folder
I have a library I am trying to port over to use on a Particle Boron from an Arduino project and it’s structured according to the above rules however it’s not able to be found by the compiler.
Creating c:/Users/<username>/Documents/GitHub/icarus_firmware/target/1.5.2/boron/platform_user_ram.ld ... In file included from c:/Users/<username>/Documents/GitHub/icarus_firmware/libraries/SimpleHDLC/src/SimpleHDLC.cpp:1:0: c:/Users/<username>/Documents/GitHub/icarus_firmware/libraries/SimpleHDLC/src/SimpleHDLC.h:7:21: fatal error: FastCRC.h: No such file or directory compilation terminated.
You can find the project and the specific library I am referring to here: https://github.com/outoftolerance/icarus_firmware/tree/master/libraries/FastCRC
I’ve tried a number of different experiments with naming, file locations, etc but can’t seem to get it to compile, any insight as to why the compiler can’t find the file would be much appreciated!