Include libraries not found

I am using VS Code v 1.33.1 and PlatformIO IDE v 1.7.1.
When building a .cpp file with included libraries the compiler complains about the main.cpp file, that the libraries cannot be found, (but it compiles & uploads a file that works fine). Is there a way to get rid of these problem messages ??

(main.cpp)
#include <ESP8266WiFi.h>;
#include “SPI.h”
#include “Adafruit_GFX.h”
#include “Adafruit_ILI9341.h”
#include “XPT2046_Touchscreen.h”
// Display fonts :
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMono12pt7b.h>

(lib folder)
Adafruit_GFX
Adafruit_ILI9341
XPT2046_Touchscreen

(include folder)
empty…

(outout)
cannot open source file “Adafruit_ILI9341.h”
cannot open source file “XPT2046_Touchscreen.h”
cannot open source file “Fonts/FreeMonoBold12pt7b.h”
etc. etc.

/GurraE

must be in <> not in ""

1 Like

I had the exact same problem with a newly created project that reused lots of “old” code and personal libs. I closed VSCode et restarted it and everything was fine. I guess some refernces need to be re-loaded for intellisense.

You can easily rebuild intellisense in VSCode:

CTRL-SHIFT-P to get the command pallette, then type rebuild (no quotes) to list all the rebuild commands, then select the one to rebuild intellisense index.

Saves time rebooting VSCode.

Cheers,
Norm.