I've recently switched to Visual Studio Code as IDE for a more complex Arduino project.
In order to avoid "cannot open source file" warnings related to #include
statements for builtin Arduino libraries, I already added the Arduino directory to IntelliSence includePath
setting.
Unfortunately, two external libraries do contain an #include
for older Arduino versions:
#if ARDUINO >= 100
#include "Arduino.h"
#else
extern "C" {
#include "WConstants.h" // <-- this is the first
}
#endif
and
#if ARDUINO >= 100
#include <Arduino.h>
#else
#include "WProgram.h" // <-- this is the second
#include "pins_arduino.h" // <-- this one was found in Arduino dir
#endif
As this files is no longer part of the Arduino environment, I get a warning.
Question: How do I exclude this warnings regarding WConstants.h
and WProgram.h
from Visual Studio Code's IntelliSense without deactivating any other include warnings?
I am not sure whether this is related to Visual Studio Code include single file on excluded path .