I have the CLI version of PROS with VSCode and am new to using it. When I try to compile my code, it comes up with the error even though I haven’t changed any of the code. Do you know how to fix this problem?
:
main.cpp:1:18: fatal error: main.h: No such file or directory
#include “main.h”
^
compilation terminated.
It says pretty clearly that it cannot find the file main.h
. Is there a file called main.h
in your project’s include
directory?
Yeah there is. I haven’t changed anything from when I first built the folder using the CLI, yet it comes up with the error.
Could you show us your directory structure?
What command are you using to compile, and can you show the full terminal output?
I am using the default “build/run” code in VSCode. I tried what the PROS Docs said to do to fix the error, but I didn’t it worked.
That is not how you compile a pros project.
VSCode has nothing to do with PROS, the V5, or the PROS CLI, so how do you expect it to know to compile for the V5.
Its attempting to compile for your computer, using no knowledge of the PROS toolchain.
Read the pros documentation on how to use the cli.
Ok, I tried prosv5 -mut and it worked, I sorry for wasting your time, I am new to PROS/coding.
Thank you so much