c++ – Undefined Symbols for architecture x86_64: Compiling problems

c++ – Undefined Symbols for architecture x86_64: Compiling problems

Theres no mystery here, the linker is telling you that you havent defined the missing symbols, and you havent.

Similarity::Similarity() or Similarity::~Similarity() are just missing and you have defined the others incorrectly,

void Similarity::readData(Scanner& inStream){
}

not

void readData(Scanner& inStream){
}

etc. etc.

The second one is a function called readData, only the first is the readData method of the Similarity class.

To be clear about this, in Similarity.h

void readData(Scanner& inStream);

but in Similarity.cpp

void Similarity::readData(Scanner& inStream){
}

c++ – Undefined Symbols for architecture x86_64: Compiling problems

Leave a Reply

Your email address will not be published.