我有静态库和另一个使用它的程序。
在静态库中,如果我在没有继承的情况下定义标题,它可以正常工作。
class TcpCommunication
另一方面,如果我对 QT 类使用 inheretence,
class TcpCommunication:public QTcpServer
编译使用此静态库的代码时出现链接错误。
>MStoDKAPId.lib(TcpCommunication.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QTcpServer::~QTcpServer(void)" (__imp_??1QTcpServer@@UAE@XZ) referenced in function "public: virtual __thiscall TcpCommunication::~TcpCommunication(void)" (??1TcpCommunication@@UAE@XZ)
可能是什么问题?谢谢。