LNK2019错误-如何消除它们

LNK2019 errors - how do I get rid of them?

本文关键字:何消 错误 LNK2019      更新时间:2023-10-16

使用msvc2008编译器处理qt项目。我从一个在visualstudio2008中运行良好的示例项目中复制了一些函数,但现在我遇到了LNK2019错误。我环顾四周,他们似乎是因为编译器没有找到某种声明?

错误为:

trackerwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned short const * __thiscall CPDIdev::GetLastResultStr(void)" (__imp_?GetLastResultStr@CPDIdev@@QAEPBGXZ) referenced in function "private: bool __thiscall trackerWindow::Connect(void)" (?Connect@trackerWindow@@AAE_NXZ)

trackerwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CPDIbiterr::Parse(unsigned short *,unsigned long)const " (__imp_?Parse@CPDIbiterr@@QBEXPAGK@Z) referenced in function "private: bool __thiscall trackerWindow::SetupDevice(void)" (?SetupDevice@trackerWindow@@AAE_NXZ)

trackerwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall CPDIdev::StartPipeExport(unsigned short const *)" (__imp_?StartPipeExport@CPDIdev@@QAEHPBG@Z) referenced in function "private: bool __thiscall trackerWindow::SetupDevice(void)" (?SetupDevice@trackerWindow@@AAE_NXZ)

CPDIdev类来自我使用的硬件所使用的库,所以我没有写过任何代码,也不理解任何代码

我在.pro文件中有以下内容

INCLUDEPATH += D:PatriotInc
LIBS += D:PatriotLibPDI.lib

#include "PDI.h"

在头文件(trackerwindow.h)中…不确定我缺少了什么声明或包含。。。

有什么想法吗?非常感谢!

这意味着您缺少一个导入库.lib