I was trying to migrating from Arduino to PlatformIO, but I’ve got a problem. “ESP Logger” library fails during compiling. I’ve just tried to compiled the simplest example included in this library.
It fails in include process. This library makes use of SD and SPIFFS libraries embedded in ESP32 Arduino core to implement the “log” functionalities. The first example use only the SPIFFS implementation, but of course, the toolchain will compile all the *.cpp in the library folder, including the one regarding the SD implementation. Unfortunately, the latter fails during compilation saying:
fatal error: SD.h: No such file or directory
I’ve found a workaround reading this post, basically adding an include of SD.h in the main file of the project.
Is this the proper solution or is there a proper way to include the Arduino “core” libraries? Because it seems weird to include unnecessary files in main file, especially considering that in Arduino this library works fine.
Thanks for your work.