Code compiles and arduino specific intellisense seems to work but Arduino.h is highlighted in error with the following error shown
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\User\Documents\repos…\src\main.cpp).
cannot open source file “Arduino.h”
If I click the light bulb and follow to the include path It has just one line
I have the same problem. Closed VSCode and removed .vscode folder from one of the projects (the only project in the workspace that has the problem) in the default location workspace. The difference is that the lightbulb now suggested to add a path. But the problem did not go away. All projects in the workspace compile fine, one tells me that Arduino.h could not be found and also compiles fine.
Every other day I create a new project, copy old files into it and it runs for an hour or a day. Then, magically, I get the dreaded "#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\Tom…\src\main.cpp).C/C++(1696)
Is there a fix for this? Deleting .vscode doesn’t help for me either.
The error is cosmetic as the code complies but the annoying errors are still there.
Also getting warnings on SPI.h and any other files I try to include, again cosmetic and the code compiles.
Have also tried disabling all extensions.
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/PlatformIO/Projects/test/src/main.cpp).C/C++(1696)
So that all looks good. Do you see the Arduino.h with valid content in /home/greg/.platformio/packages/framework-arduino-avr/cores/arduino? Is the compiler invocable with
The file you shown me was for /home/greg/Documents/PlatformIO/Projects/Test, not a project called Commodore 64 USB Keyboard. Do you have multiple workspaces open at once?
So that looks good too. But do you have multiple workspaces open? Maybe multi-root is a problem.
When you close all workspaces except the one for your initial “Test” project, does the same error occur? Does it change when you execute the “Rebuild Intellisense” task in VSCode?
When I open the Test project the issue is no longer there. I’ve now closed all work spaces and opened the C64 USB Keyboard project and the issue comes back.
Have also tried to rebuild the intellisense task, didn’t make any difference. Have also now upgraded to VS Code 1.42.0. Issue persists.
Just a shot in the dark, but can you rename the folder /home/greg/Documents/PlatformIO/Projects/Commodore 64 USB Keyboard to /home/greg/Documents/PlatformIO/Projects/Commodore64USBKeyboard (no spaces)?