Hi there
I have problems using a dll in my Qt-project. The library is used to control this device.
In my .pro file I have inserted the following lines to include the top16.dll and the FTD2XX.dll in the lib directory of my project:
Code:
LIBS += -Llib \ -lFTD2XX \ -ltop16
The header file top16.h looks like this
Code:
#ifndef TOP16_H #define TOP16_H #include <qglobal.h> class Q_DECL_IMPORT top16 { public: top16(); int dllversion(); }; class Top16 { public: Top16(); }; #endif // TOP16_H
And the top16.cpp files is this
Code:
#include "top16.h" #include <QDebug> Top16::Top16() { top16 myTop16; qDebug() << "top16 dll version: " << myTop16.dllversion(); }
When compiling the project it returns those errors:
I guess it is a problem with the definitions in the header file but I can't figure out what the problem is. Has anyone with more experience including libraries an idea?Quote:
...top16.cpp:6: undefined reference to `_imp___ZN5top16C1Ev'
...top16.cpp:7: undefined reference to `_imp___ZN5top1610dllversionEv'
Cheers, Tom