Is cerrno the only file it cannot find? It seems a little strange that it would be able to find cmath, cstdio, etc. but not cerrno. Can you run the command pros build-compile-commands in the integrated terminal and send the output?
I had to add api.h and main.h into that src directory.
You do not need to do this… if the compiler could not find api.h inside of the include folder, how would it find all of the other header files in /include? We should focus on identifying why cerrno can’t be found instead of changing the project structure.
It is as if I need a PATH statement, environment variable, or a config file
The problem is more basic. There is no cerrno nor cmath etc on my system.
I thought I would need to install some SDK or something to get those header files.
I also find a problem that the “toolchain” could not be found:
It appears that my installation is not complete. Here is what is there:
C/C++ Extension Pack
Better C++ Syntax
I am running low on disk space, and I am concerned that the CRT SDK is going to blow it.
So what is the minimun set of pre-requisites required to build and upload?
The minimum pre-requisites to my knowledge are the PROS cli and PROS toolchain. Installing both will take up about 1GB of storage. Currently, the VSCode extension will also force install the clangd extension, but I’m not sure how much space that takes up.
Since you were able to create a pros project (either through the sidebar button or the pros c n command), I will assume that the CLI installation was successful.
If the PROS extension installed the CLI but not the toolchain, doing the following should fix it:
In VSCode, press ctrl + shift + P → Preferences: Open User Settings → Extensions → PROS, then set One Click: Toolchain Download URL to https://github.com/purduesigbots/toolchain/releases/download/v10.3-2021.07/pros-toolchain-windows.zip. Then, click “Install PROS” in the PROS sidebar. The download may take a while.
Edit: The url above will only work on windows, so don’t try it if you are on mac or linux.
Thanks., I did uninstall PROS, then install. Pros install succeeded. Then downloading toolchain. CLI and Toolchain installed successfully. Verify PROS Installation reports “CLI and Toolchain are working”
Build of main.cpp from my project src folder results in 21 errors, first being
In included file ‘cerno’ not found.
api.h [ln 23 col 10] which is #include cerrno
I can now locate such a file in
and errno.h in
So I once again downloaded pros-windows-126.96.36.199-64bit.exe from github purdue site. Releases · purduesigbots/pros-cli · GitHub
When I opened it to install, there were a few options to select, one of which referred to the toolchain path, which was not ticked by default. Before I could select it, up came the “Accept Ts & Cs” screen. Upon accepting that, the installation proceeded before I could make those installation selections.
Therefore I cancelled it, and tried again, adding in the Toolchain option. I received a warning that I was running short of disk space. I deleted some large files, the install then continued to completion.
I note some additions to the PATH environment varilble, …\PROS\toolchain\usr\bin
Tried again -
cerrno not found, then for api.h [ln 23, Col 10] Use of undeclared identifier ‘pros’
then for ‘LCD_BTN_LEFT’ etc
21 error diagnostics
Just to confirm, these errors occur when you run pros build-compile-commands in the PROS integrated terminal (Click “Integrated Terminal” in the PROS Sidebar), not the problems tab that VSCode offers, right? VSCode is not great when it comes to figuring out include errors, and I’m not sure what the issue with the toolchain could be.
I was doing “Open file” then “build” from the PROS sidebar.
If I go to the terminal CLI mode:
PS C:\temp\src> pros build main.cpp
WARNING - pros.ga.analytics:send - Unable to send analytics. Do you have a stable internet connection?
make: *** No rule to make target ‘main.cpp’. Stop.
ERROR - pros.cli.build:make - Failed to make project: Exit Code 2
Error: Failed to build
Sentry is attempting to send 1 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit
PS C:\temp\src> ls
Thanks for all the help. I uninstalled PROS, re-installed, Performed Create Project, gave it a name, and this time it created all the required files
Now, main.cpp compiles with no errors, and I am happy. It would seem that previous installs of PROS and toolchain did not complete successfully.
Since this was my first attempt, I did not know what to expect.