Pros Build Error

So I am trying to build a project and I keep getting the error : image
Even though It is not being defined anywhere but there. By removing #include “autonomousSelector.h” it builds and works. The problem is I need that file in my autonomous.

Heres the code: Autonomous: image
autonomousSelector.cpp: image
autonomousSelector.h: image

Does the code work for the purpose you want it to acheive?

Though i’m not a CPP expert…

in the hpp, I think you want to change AutonomousType SelectedAutonomousType;
to extern AutonomousType SelectedAutonomousType;

and then have the cpp define it in side the namespace like:

namespace Autonomous {
  AutonomousType SelectedAutonomousType;
1 Like