Qt Visual Studio 2015 Add-in编译问题
Qt Visual Studio 2015 Add-in compilation problem
我在我的项目中使用 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)...
P.S.: 我也在看 qt simple tcp communication with ui projects 。我不明白我怎么能“你需要启用你在 Qt 项目设置中使用的模块”。
UPD1: 编译成功,但构建仍然失败。
错误出现在包含附加依赖项(删除)和包含目录(添加)中
我在我的项目中使用 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)...
P.S.: 我也在看 qt simple tcp communication with ui projects 。我不明白我怎么能“你需要启用你在 Qt 项目设置中使用的模块”。
UPD1: 编译成功,但构建仍然失败。
错误出现在包含附加依赖项(删除)和包含目录(添加)中