I have a series of files from a shared github project and they run perfectly for everyone else. But everytime I run them I get a
"CMakeFiles/Dice.cpp.dir/Player.cpp.o: In function Player::Player(std::string)':
/cygdrive/c/Users/Abby/CLionProjects/Risk_Domination/Player.cpp:51: undefined reference to
Dice::Dice()'"
error. Dice is the only class that I wrote on my computer. It is included in all the files it is used in, I don't know why the two won't link. I get the same error again the next time I refer to the variable dice.
The file player, which is getting the error, includes everything below. And the class Dice does include a constructor Dice(), which is defined and has been tested.
#include "Dice.h"
//and errors are pointing to line 51:
this->dice = new Dice();
//and line 81
a = dice->rollDice(number_of_dice);