I am pretty sure this question is duplicate, but my code is different here, the following is my code. It fails with a \"Undefined symbols\" error, not sure whats missing.
Parent::~Parent() is not defined.
Parent::~Parent()
You can put the definition directly into the class definition:
class Parent { public : virtual int func () = 0; virtual ~Parent() {}; };
Or define it separately. Or, since C++11, write virtual ~Parent() = default;.
virtual ~Parent() = default;
In any case, a destructor needs a definition.