So I am trying to build a project and I keep getting the error :
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:
autonomousSelector.cpp:
autonomousSelector.h:
CarCar
October 16, 2019, 9:56pm
2
Does the code work for the purpose you want it to acheive?
rpm
October 16, 2019, 10:29pm
3
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