I need to compile some source code into a DLL, and load it in other project. I have an entry called
extern "C" LTCPOS_LSHARED_EXPORT tcpClient_Os* getClientInst(VhostInfo hostInfo, CtcpOpt *tcpOpt, QObject *parent = 0);
The type of "tcpClient_OS" is a self-defined class. When I load the DLL using QLibrary in a different project it appears that I must add the source file (cpp files) into the *.pro in order to make the project compiled without errors. Why?
What is the normal routine of building a DLL with a function returning self-defined class pointer and how do I load it?