I’m getting this weird linker error:
Error 1 error LNK2019: unresolved external symbol "public: virtual __thiscall Data::~Data(void)" (??1Data@@UAE@XZ) referenced in function "public: virtual __thiscall Job::~Job(void)" (??1Job@@UAE@XZ) C:\...\Job.obj
Error 2 error LNK2019: unresolved external symbol "public: __thiscall List::DataNode::DataNode(class List::DataNode const &)" (??0DataNode@List@@QAE@ABV01@@Z) referenced in function "public: __thiscall List::List(class List const *)" (??0List@@QAE@PBV0@@Z) C:\...\List.obj
from the first error description, it might have something to do with a destructor.
I have an empty and abstract data class with a pure virtual destructor:
virtual ~Data()=0;
and a class Job which derives from data, with a trivial implementation of the destructor:
Job::~Job()
{
}
Can you spot a problem? How can I fix it?
Thanks!
You need to provide definition for a pure virtual destructor.
C++03 12.4 Destructors
Para 7: