因为一直用VS+Qt, 习惯了VS的智能提示,没有用QtCreater做开发。这次做一个物联网模拟器,用了QUdpSocket来进行网络通信,一编译:
1>SimNodeSendThread.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: bool __cdecl QAbstractSocket::bind(class QHostAddress const &,unsigned short,class QFlags<enum QAbstractSocket::BindFlag>)" (__imp_?bind@QAbstractSocket@@QEAA_NAEBVQHostAddress@@GV?$QFlags@W4BindFlag@QAbstractSocket@@@@@Z),该符号在函数 "public: __cdecl SimNodeSendThread::SimNodeSendThread(unsigned int,unsigned short)" (??0SimNodeSendThread@@QEAA@IG@Z) 中被引用
1>SimNodeSendThread.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl QHostAddress::QHostAddress(enum QHostAddress::SpecialAddress)" (__imp_??0QHostAddress@@QEAA@W4SpecialAddress@0@@Z),该符号在函数 "public: __cdecl SimNodeSendThread::SimNodeSendThread(unsigned int,unsigned short)" (??0SimNodeSendThread@@QEAA@IG@Z) 中被引用
1>SimNodeSendThread.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl QHostAddress::~QHostAddress(void)" (__imp_??1QHostAddress@@QEAA@XZ),该符号在函数 "public: __cdecl SimNodeSendThread::SimNodeSendThread(unsigned int,unsigned short)" (??0SimNodeSendThread@@QEAA@IG@Z) 中被引用
1>SimNodeSendThread.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl QUdpSocket::QUdpSocket(class QObject *)" (__imp_??0QUdpSocket@@QEAA@PEAVQObject@@@Z),该符号在函数 "public: __cdecl SimNodeSendThread::SimNodeSendThread(unsigned int,uns