I am working on a rather large project (ESP32 / Arduino framework).
I now have 12+ modules such as ‘touchscreen’, ‘network’, ‘filesystem’, etc. and each of these modules are in separate folder / files under the folder ‘lib’. Of course these modules interact a lot, so many modules include the header files of other modules. Finally these modules use many built-in libraries such as WiFi.h etc. so these are also included.
As my project gets bigger, I am running into problems with the well known “fatal error: WiFi.h: No such file or directory” (see eg. Why is WiFi.h not found by compiler)
I already have
lib_deps = WiFi
and I have
lib_ldf_mode = chain+
but still I am running into problems when the compiler doesn’t find header files, which are obviously there, because you can simply ctrl+click on them and they open…
QUESTION : Instead of relying on the magic of the LDF, is there not a more robust, manual way of defining all libraries…
- own in ‘lib’ folder (12+ subfolders)
- on github (5 libraries)
- built-in, eg. ESP32-Arduino framework
…so that these include errors are a thing of the past.
I think it would also build faster that way because the LDF (chain+) takes quite some time now.
Are there any examples / docs / blogposts on how to do this ? I think it’s a must have for professional. large project developments.