c++qtcompiler-errorscanon-sdk

Undefined reference error when using canon EDSDK


I'm developing an application which uses canon EDSDK.

According to documentation, i've moved EDSDK folder into my project folder, included a path to .h files and linked the EDSDK library to my project using theese lines of code in my .pro file:

INCLUDEPATH += C:\QtProjects\EcoGeosPhoto\EDSDK\Header

LIBS += C:\QtProjects\EcoGeosPhoto\EDSDK\Library\EDSDK.lib

The paths are correct.

I also included all the .h files like so:

#include "EDSDK.h"
#include "EDSDKErrors.h"
#include "EDSDKTypes.h"

The problem is that when i use simple lines of code, such as:

EdsError err = EDS_ERR_OK;
EdsCameraListRef cameraList = nullptr;
err = EdsGetCameraList(&cameraList);

compiler complains about "undefined reference to `__imp_EdsGetCameraList'".

Am i missing something? Any help is appreciated.

P.s. i'm using MinGW 7.3.0. 64-bit for C++ compiler, if that matters.


Solution

  • Moving .dll files to the location of the exe file did the trick for me