My device constructors show up as undeclared identifiers in my autonomous code. How do I fix this?

I am trying to code an autonomous for our team’s robot, but the device variables I have configured in robot-config.cpp are not usable in main.cpp as they are denoted with “undeclared identifiers”. I have found many tutorials, but they all seem to be able to use their configuration variables without having to declare them in the main.cpp. What am I doing wrong?

Side note: I am not actually using those exact functions. I am just trying to test out variable usage

have those motors been declared as extern in robot-config.h ?


I just now typed this in the robot-config.h as

extern motor leftMotorA;

extern motor leftMotorB;

but that still did not fix the problem.

Sometimes in Vexcode Pro, you just have to wait for a bit if you are doing text configuration. If you hit “build” in this situation it should build fine. I do not know what is up with it, but that’s how I get around it.