Errors while trying to build code using VSCode Extension

As the title says, I have coded and have tried to upload. I keep getting these errors. I have these extensions installed: C/C++, CMake, CMake Tools, VEX Robotics & Feedback.




All these images are the error, my file structure, and how I am including the ports and such.
This is using the V5 Competition Template.

do not include robot-config.cpp inside another cpp file (assume main.cpp)
and why do you have two files both named robot-config.cpp, one should be a header file presumably.

1 Like


That is when only one robot-config.cpp file exists under src or when it is a .h file under include. That is why I have two, one under include.

it is not seen unless it is a .cpp file under include. I have no idea why this happens, it just kinda is.

you need a header file, robot-config.h with variable and function declarations. Then you need to define the variables and functions in a cpp (ie. the actual code) file.

and also (old, only slightly relevant)

2 Likes