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?
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?