Search code examples
qt-creatorflycapture

Using FlyCapture SDK with Qt Creator


I am usign Windows 7, Qt Creator 4.4.1 (x32) and FlyCapture SDK 2.11.3.425. The problem is that I keep getting linking errors when trying to use the FlyCapture Library.

I have boiled down the problem to a simple program. The SDK main path is C:/PointGrey

main.cpp

#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

These are the errors:

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

I have tried to import the .lib file located in /bin, but without success.

So, how can I use FlyCapture SDK with Qt creator? Am I missing some .dll? Is FlyCapture only compatible with Visual Studio?


Solution

  • The problem was I was tring to compile the project with MinGW, while the FlyCapture library was compiled with Visual C++.

    I changed the compiler in Qt Creator and the problem was solved.