I have a library registered as htcw_gfx. The trouble is that it will not use SPIFFS or SD (FS.h on ESP32, or SD.h on other platforms) because they aren’t listed as dependencies.
They can’t be listed as hard dependencies because they’re not always available. I allow you to turn off those dependencies based on platform, but I need those dependencies to be available if they’re present for the platform.
Such that on an ESP32 i have access to SPIFFS and SD (via FS.h)
And such that on most other Arduino platforms I have access to SD via SD.h)
What I need I think, is a way to list dependencies and the project will still build if they’re not present.
Failing that, any way to get what I need would be helpful.
Edit: I just realized this may not be my problem at all.
Here’s what I’m getting trying to include FS.h using node32s (ESP32) and arduino: (FS.h should be available)
- Looking for FS.h dependency? Check our library registry!
- CLI > platformio lib search “header:FS.h”
- Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\node32s\libd7c\htcw_gfx\gfx_font.cpp.o] Error 1
In file included from .pio\libdeps\node32s\htcw_gfx\src\io_stream.cpp:2:0:
.pio\libdeps\node32s\htcw_gfx\include/io_stream.hpp:18:24: fatal error: FS.h: No such file or directory
- Looking for FS.h dependency? Check our library registry!
- CLI > platformio lib search “header:FS.h”
- Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\node32s\libd7c\htcw_gfx\io_stream.cpp.o] Error 1