Hello! . We have switched to Pros on VS Code; whenever we make a new project it has many errors in “main.h” and every single other file as well. Is there a missing file or am I somehow missing something in the download?
I can’t help you, as I am not familiar with PROS.
However, for the benefit of those who can, could you include more context?
What error(s) is VS code generating?
That is because VS Code itself does not recognise these because these are not standard CPP headerfiles or functions. What you should do to find errors is go to the PROS extension and click build project or type
pros build in the console.
I hope that helps! You can just ignore the red lines or disable them (click here to find out how) Note: I have not tried the method in the link so I cannot guarantee it works
Instead of just disabling the errors, you should install the cpp extension for vscode and configure a c_cpp_properties.json file to get proper intellisense. The setting that should fix your issue would be
includePath. You need to add the path to where all the header files for PROS are to this. I haven’t done this with PROS before, so I don’t know exactly what to put for this value, and I’m not at my computer right now so I can’t figure it out. I can probably figure it out later when I am back at my computer.
I have the cpp extension already. I don’t know where to find the “c_cpp_properties.json” though. Do you know where I could find that to configure it? Thanks for the help!
It should be in the .vscode folder. If it isn’t there, try hovering over one of the errors and clicking “quick fix…”. If I remember right one of the quick fixes is to configure the includePath setting, and if the c_cpp_properties.json file isn’t there it should create one.
I got the json file but I’m not sure how to make this work exactly. I looked at the link you sent me with the documentation for it but I’m unfamiliar with this language. How do I make that path?
clangd extension. It’ll prompt you to uninstall
Intellisense, and will fix all of these linter errors.
based off the info from this page, try updating the
c_cpp_properties.json file with this:
I can’t test this right now, but I think this should work
Actually, try completely removing the file. It seemed to work without it for me
Thank you very much for your help! It’s now working.