我使用的是 Windows 7、Qt Creator 4.4.1 (x32) 和 FlyCapture SDK 2.11.3.425。问题是我在尝试使用 FlyCapture 库时不断收到链接错误。
我已将问题归结为一个简单的程序。SDK主路径为C:/PointGrey
主文件
#include <FlyCapture2.h>
using namespace FlyCapture2;
int main()
{
Camera camera;
return 0;
}
FlyCaptureApp.pro
SOURCES += main.cpp
INCLUDEPATH += C:\PointGrey\include
LIBS += C:\PointGrey\bin\FlyCapture2.dll
这些是错误:
C:\Users\Gabriel\Desktop\Qt Basic\FlyCaptureApp\main.cpp:8: error: undefined reference to `_imp___ZN11FlyCapture26CameraC1Ev'
C:\Users\Gabriel\Desktop\Qt Basic\FlyCaptureApp\main.cpp:8: error: undefined reference to `_imp___ZN11FlyCapture26CameraD1Ev'
C:\Users\Gabriel\Desktop\Qt Basic\FlyCaptureApp\main.cpp:8: error: undefined reference to `_imp___ZN11FlyCapture26CameraD1Ev'
collect2.exe:-1: error: error: ld returned 1 exit status
我试图导入位于 /bin 中的 .lib 文件,但没有成功。
那么,如何将 FlyCapture SDK 与 Qt creator 一起使用?我错过了一些 .dll 吗?FlyCapture 是否仅与 Visual Studio 兼容?