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:
LIBS += -Llib \
-lFTD2XX \
-ltop16
LIBS += -Llib \
-lFTD2XX \
-ltop16
To copy to clipboard, switch view to plain text mode
The header file top16.h looks like this
#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
#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
To copy to clipboard, switch view to plain text mode
And the top16.cpp files is this
#include "top16.h"
#include <QDebug>
Top16::Top16()
{
top16 myTop16;
qDebug() << "top16 dll version: " << myTop16.dllversion();
}
#include "top16.h"
#include <QDebug>
Top16::Top16()
{
top16 myTop16;
qDebug() << "top16 dll version: " << myTop16.dllversion();
}
To copy to clipboard, switch view to plain text mode
When compiling the project it returns those errors:
...top16.cpp:6: undefined reference to `_imp___ZN5top16C1Ev'
...top16.cpp:7: undefined reference to `_imp___ZN5top1610dllversionEv'
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?
Cheers, Tom
Bookmarks