我在我的项目中使用Qt插件。但是我不明白,我做错了什么。
我的.pro文件:
QT += core gui network
TEMPLATE = app
TARGET = MMworker
DESTDIR = ../Debug
CONFIG += debug
LIBS += -L"../../../../boost_1_70_0/stage/lib"
DEPENDPATH += .
MOC_DIR += .
OBJECTS_DIR += debug
UI_DIR += .
RCC_DIR += .得到了很多错误。例如
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall QHostAddress::QHostAddress(void)" (__imp_??0QHostAddress@@QAE@XZ) referenced in function...
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: bool __thiscall QHostAddress::setAddress(class QString const &)" (__imp_?setAddress@QHostAddress@@QAE_NABVQString@@@Z) referenced in function ...
Error LNK2019 unresolved external symbol "public: void __thiscall TcpServer::connectToServer(class QHostAddress,int)" (?connectToServer@TcpServer@@QAEXVQHostAddress@@H@Z) referenced in function...
Error LNK2019 unresolved external symbol "public: bool __thiscall MainTimer::timeAfterMomentExceeds(__int64,__int64)" (?timeAfterMomentExceeds@MainTimer@@QAE_N_J0@Z) referenced in function ...
Error LNK2019 unresolved external symbol "private: __int64 __thiscall MainTimer::getMilliseconds(void)" (?getMilliseconds@MainTimer@@AAE_JXZ) referenced in function "public: __int64 __thiscall MainTimer::time_ms(void)" (?time_ms@MainTimer@@QAE_JXZ)...
Error LNK2019 unresolved external symbol "public: void __thiscall Channel::readData(class QString &)" (?readData@Channel@@QAEXAAVQString@@@Z) referenced in function ...
Error LNK2001 unresolved external symbol "public: virtual void * __thiscall SimpleDevice::qt_metacast(char const *)" (?qt_metacast@SimpleDevice@@UAEPAXPBD@Z)...附言:我也在qt simple tcp communication with ui projects中查找。我不明白我怎么能“你需要在Qt项目设置中启用你正在使用的模块”。
UPD1:编译成功,但构建仍在下降。
发布于 2020-06-23 23:08:35
包含附加依赖项(已删除)和包含的目录(已添加)时出错
https://stackoverflow.com/questions/62490372
复制相似问题