Why are some libraries not available when I just copy them to the lib folder?

I created a project for ESP32. Added several libraries to it. I copied the libraries to the “lib” folder. The project compiles successfully.
Next I added the library GitHub - arduino-libraries/LiquidCrystal: Liquid Crystal Library for Arduino
I just downloaded and copied it to the “lib” folder
Another library has a link to LiquidCrystal:

#define LCD_LIB LiquidCrystal
#define LCD_LIB_H <LiquidCrystal.h>
#endif
#include LCD_LIB_H

And when compiling I get the error:
fatal error: LiquidCrystal.h: No such file or directory
But if I add a dependency in platformio.ini :
lib_deps = fmalpartida/LiquidCrystal@^1.5.0
Then the project will compile normally.

I suspect that the order in which the libraries were added from the lib folder is incorrect. Perhaps I can somehow manually specify the order of the libraries from the lib folder?

lib_ldf_mode — PlatformIO latest documentation

1 Like