我有静态库和使用它的另一个程序。继承类的链接错误
在静态库中如果我定义头没有inheretence它工作正常。
class TcpCommunication
在另一方面如果我使用inheretence用QT类,
class TcpCommunication:public QTcpServer
我得到链接错误,当我编译使用这种静态库的代码。
>MStoDKAPId.lib(TcpCommunication.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QTcpServer::~QTcpServer(void)" ([email protected]@[email protected]) referenced in function "public: virtual __thiscall TcpCommunication::~TcpCommunication(void)" ([email protected]@[email protected])
可能是什么问题? 谢谢。
当然你是对的,我加了QtNetworkd.lib,问题就解决了。 – metdos 2010-05-18 12:17:55