This question led me on a wild goose chase, so I wanted to revise it to get the facts straight.
I am working with a set of classes which were arranged like this
//third party .h file
class ChildX : public ParentY {
public:
OtherClass member;
}
//third party .h file
class ParentY {
protected:
ParentY();
//other public attributes
}
//third party .cpp file
ParentY::ParentY {
}
Any time I tried to compile one of these classes I got an unhelpful error message
Undefined reference to 'ParentY::ParentY()' in function 'SomeClass::DoX()';
The error is completely unhelpful, but I have finally determined that the problem is caused by the constructor in the CPP file. Apparently the code which includes the ChildX.h file does not link with the constructor hidden in the ParentY.cpp file. The solution (e.g. https://ubuntuforums.org/showthread.php?t=1966081) seems to require that the cpp file in question be compiled before running the rest of the build.
So now that I have figured out WHAT the error is and how to resolve it, I just need to figure out how to do it in QtCreator