PROS Visual Studio Code Issues


I am trying to use VS Code with pros. I understand that build and uploading have to be done through the terminal. I have installed the VS Code C/C++ extension. But for some reason, VS Code is giving me a ton of random errors, I have attached the images below, I have no idea how to fix this. Please Help.


Have you included PROS into your program file? It doesn’t look like anything under pros:: is recognized.

The main issue that you’re seeing is that you need to tell VS Code about the include folder, as that’s where all the headers are. It can’t find them, so everything is erroring. There are a couple of other things that may be needed (eg we aren’t using the amd64 gcc that the linter might use by default).

The pros CLI will spit out a compile_commands.json which contains this information, which is what we use for atom. I don’t know VS Code well enough to know if it can accept that, but, if not, adding the include folder will solve your immediate issue.

1 Like

Do you mind walking me through it I am not sure how to do that?

So I tried to change the cpp properties json file as so:
And the pros errors are gone but now the api.h is giving me errors:
I am not sure why? use this one .
Vscode is hard to use, but CCLS is very complex to install on windows

If you haven’t yet run prosv5 build-compile-commands clean all to generate the compilation database Nathan was talking about, you should.

This should tell vs code the rest of what it needs to know about where to find the toolchain’s system include files.

Note that you should re-run this command every time you add a new file.

1 Like

I ran the build compile commands command and am still getting some errors:

Those look like actual errors. You need using namespace pros; or simular.