I would like to use a class from one Qt project (A) in another (B). I am able to successfully include the .h file from A in B, and build project B. However, when I try to create an object declared in the .h file in B, I get a link error (Unresolved External Symbol). Can I do what I am trying to do, and if so how? I have tried using include() in my B.pro file, but get compile errors. The link error is the farthest I have gotten (with no changes to my .pro file).
In B's main.cpp file I have: #include "../A/testymctestface.h"
In the main I try to create an object of the included class:
TestyMcTestFace test;
This is when I get the link error.
testymctestface.h contains:
class TestyMcTestFace{
public:
TestyMcTestFace();
};
testymctestface.cpp contains:
#include "testymctestface.h"
TestyMcTestFace::TestyMcTestFace(){
}