VSCode compile error

I have entered Marlin into VSCode. On compiling I get an error
include errors detected. Please update your include path …

I’ve tried to include a screen shot

Surfing for this, it appears to be a common problem with very little in the way of solutions.

The error originates usually because VSCode is trying to find some file you referenced in your code for include, but it is not at the place it is looking for.

Farther to the right in that line VSCode will let you know which file exactly it is trying and failing to locate. If you can’t expand the window more it should show up when you hover your mouse above that line. Sometimes the file is there, but if you open it there might be another include that fails. Usually at the end of that chain you find the culprit. Good luck.

1 Like

Hi,
Thanks for your prompt reply. I have managed to compile now, fortunately without chasing down includes. I had used VSCode a couple of years ago to add BLTouch to my A10T, so knew it should work. This time, VSCode updated itself to a newer version, along with the C/C++ compiler. A web search revealed a couple of solutions:- start a new workbook, or revert the C/C++ compiler. I tried both, unfortunately both at the same time, but one of them worked.

1 Like

Platformio uses a different compiler and a different method for finding includes. Sometimes vscode will underline an include and mark it as an error. But you can ignore it and only look at the errors printed from the pio compiler. Marlin from MarlinBuilder releases is compiled using platformio right before the zip. So that code should compile cleanly every time.

Thanks for that. My experience with VSCode of late is that sometimes I get the include problem, other times not. Totally random. Closing and reopening seems to fix it.
On the positive side I’ve managed to get the Marlin CNC tuned to the donor controller in my A10T, uploaded and working. I’ve used the A10T as an emulator for the MPCNC before stripping the board and PSU out for the MPCNC. I’ll put the details of which lines in Marlin that need editing in my build log.