-
Notifications
You must be signed in to change notification settings - Fork 236
Include files not found when in VSCode but fine when in ArduinoIDE #1614
Comments
It seems that on Windows, libraries must be in the C:\Users\[user]\Documents\Arduino\libraries folder, then they will be found by the compiler, the only way I'm able to compile is if I copy my libraries to the folder I mentioned above. |
From some more testing, I guess that the arduino-cli tool when used by VS Code doesn't use the configuration file (arduino-cli.yaml) that is stored in the folder %userprofile%.arduinoIDE by the Arduino IDE 2.0. I copied arduino-cli.yaml from %userprofile%.arduinoIDE\ to %userprofile%\AppData\Local\Arduino15\ and compilation now works. |
Thanks for this info, Mick. I've been a bit unwell the last few days so haven't looked into this more but starting to feel better now so will look tomorrow. I should also have mentioned in my original post that I am using VSCode on a Mac and not the Windows version, apologies. |
YOU ARE A BEAST! This is the only thing that I found has worked so far. Can you please share it other place? Apparently this is quite the unsolved problem. |
Awesome. Moving yaml config helped. |
The solution that worked for me was to open the the C:\Users<username>\AppData\Local\Arduino15\arduino-cli.yaml file and update the user directory to the installation path of arduino which in my case was: C:\Program Files (x86)\Arduino |
You can also paste the
It should work. |
When I create a file within the ArduinoIDE2 everything runs fine, all the #includes are found and the file compiles and uploads to my LilyGo T-Display Touch board perfectly. However, when I open the very same file in VSCode, I get a multitude of cannot find source file errors.
Why would the code run perfectly in ArduinoIDE yet the very same file won't compile in VSCode. Any pointers please? Why would the include paths be any different?
Top part of screenshot is file in VSCode, bottom part is in Arduino.
The text was updated successfully, but these errors were encountered: