LNK2019错误 - 我如何摆脱它们?

时间:2011-06-13 11:05:57

标签: c++ visual-studio-2008 qt visual-c++ linker-errors

使用msvc2008编译器处理qt项目。我从一个在visual studio 2008中运行得很好的示例项目中复制了一些函数,但现在我收到了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:\Patriot\Inc
LIBS += D:\Patriot\Lib\PDI.lib

#include "PDI.h"
头文件中的

(trackerwindow.h)...不太确定我遗失了什么声明或包含...

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

1 个答案:

答案 0 :(得分:0)

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