VEX Code V5 pro linking error

I recently reorganized my code for simplicity, however when I defined my functions in a .cpp file and try to declare them in my .h file like so:

#pragma once

#include "vex.h"

using namespace vex;

class chassis_Set {
  public:

  void reset();

  void move(double rPower, double lPower);

  void chassisStop();

  void chassisRest();

  void driveFor(double distance, double percent = 100);

  void turnFor(double degs);
};

The linker gives me an error like this

build/src/Chassis.o: In function `chassisControlArcade()':
Chassis.cpp:(.text._Z20chassisControlArcadev+0x80): undefined reference to `chassis_Set::move(double, double)'
Chassis.cpp:(.text._Z20chassisControlArcadev+0xc4): undefined reference to `chassis_Set::chassisStop()'

Has anyone ever experienced this before, and how can I fix it?

Where do you implement the chassis_Set class ?

2 Likes

I actually figured it out, I was declaring my methods like this:

void function () {}

when I should have been declaring them like so:

void signature::function () {}