使用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)中...我不太确定我遗漏了什么声明或内容...
有什么想法吗?非常感谢!
发布于 2011-06-13 19:08:31
这意味着您缺少一个导入库.lib。
https://stackoverflow.com/questions/6329577
复制相似问题