.H file
#ifndef PROJECT_FILE_H
#define PROJECT_FILE_H
#include <iostream>
#include <stdio.h>
class File {
public:
File();
File(char *);
File(const File&);
...
.CPP file
File::File(){ }
File::File(char *_t) : t(_t) {
try {
test();
}
catch (Exception &e) {
std::cerr << e.what() << std::endl;
}
}
File::File(const File &other): t(other.v1),t1(other.v2),t2(other.v3){ }
I get undefined reference to vtable for File
error on each constructor. there is no pure virtual function definition in the class. the cmake file include both h/cpp files. What might be the problem? Thanks.