diff --git a/wpilibcExamples/src/main/cpp/templates/commandbased/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/commandbased/cpp/Robot.cpp index ed2f2764a4..6541648966 100644 --- a/wpilibcExamples/src/main/cpp/templates/commandbased/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/commandbased/cpp/Robot.cpp @@ -72,4 +72,6 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); } void Robot::TestPeriodic() {} +#ifndef RUNNING_FRC_TESTS int main() { return frc::StartRobot(); } +#endif diff --git a/wpilibcExamples/src/main/cpp/templates/iterative/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/iterative/cpp/Robot.cpp index dd3454651f..d1450a4c82 100644 --- a/wpilibcExamples/src/main/cpp/templates/iterative/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/iterative/cpp/Robot.cpp @@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {} void Robot::TestPeriodic() {} +#ifndef RUNNING_FRC_TESTS int main() { return frc::StartRobot(); } +#endif diff --git a/wpilibcExamples/src/main/cpp/templates/sample/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/sample/cpp/Robot.cpp index a050d6781b..d7efdb882f 100644 --- a/wpilibcExamples/src/main/cpp/templates/sample/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/sample/cpp/Robot.cpp @@ -87,4 +87,6 @@ void Robot::OperatorControl() { */ void Robot::Test() {} +#ifndef RUNNING_FRC_TESTS int main() { return frc::StartRobot(); } +#endif diff --git a/wpilibcExamples/src/main/cpp/templates/timed/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/timed/cpp/Robot.cpp index 9703206c13..9544e613fc 100644 --- a/wpilibcExamples/src/main/cpp/templates/timed/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/timed/cpp/Robot.cpp @@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {} void Robot::TestPeriodic() {} +#ifndef RUNNING_FRC_TESTS int main() { return frc::StartRobot(); } +#endif