2

I am running into a strange issue with including libraries in the lib folder.

Project details:

  • ESP32 with Arduino Framework
  • Trying to get the Adafruit HX8357D LCD to work

What I have done:

Please see the picture attached. I have included all the libraries that I should need. When I compile I run into the "No such file or directory error. I have clearly included the "Adafruit_I2CDevice.h" file in the lib folder under its master folder. But the compiler does not see it. Why?

If I move all the .h and .cpp files in the Adafruit_BusIO-master folder to Adafruit_GFC-Librari-master folder then the "fatal error: Adafruit_I2CDevice.h no such..." error just changes to a different file that is located in the lib folder.

This means there is a deeper issue here with the linker.

Does anyone know why it is doing this? I have not in the past had issues with including files located in the lib folder into various other sources.

Any help would be great. Thank you enter image description here

Misha
  • 556
  • 1
  • 8
  • 25

2 Answers2

1

I use TFT_eSPI by Bodmer for Adafruit HX8357D. I use the following command to install the lib in my project and it does all th taff.

 pio lib install "bodmer/TFT_eSPI@^2.3.64"

In your case have a look to c_cpp_properties.json in .vscode of your projet to be sure that the "includePath" and "path" points to the good include directories.

JPBlanc
  • 70,406
  • 17
  • 130
  • 175
1

From the home screen of PlatformIO, you will have to go to the libraries section and search for your desired libraries there, assigning libraries to your desired libraries from there. Only then it will work properly.

If your libraries are successfully added, they should be inside the .pio\libdeps of your project directory.