ich bin blutiger Anfänger in Qt (und dll's) und habe folgendes Problem:
Ich will eine dll von uC-Hersteller (SiLabs) mit folgende Code einbinden:
Code: Alles auswählen
#include <QtGui/QApplication>
#include <QLibrary>
#include <QMessageBox>
#include <QFile>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QMessageBox msgBox;
typedef void (*MyPrototype)();
QFile file("./SiUtil.dll");
if(file.exists()==true)
{
QLibrary myLib("./SiUtil.dll");
if(myLib.load()==true)
{
msgBox.setText("DLL geladen!\n");
msgBox.exec();
}
else
{
msgBox.setText("DLL nicht geladen!\n"+myLib.errorString());
msgBox.exec();
}
}
else
{
msgBox.setText("DLL nicht gefunden!\n");
msgBox.exec();
}
MainWindow w;
w.show();
return a.exec();
}
Folgende MsgBox: "DLL nicht geladen! Cannot load library ./SiUtil.dll: Das angegebene Modul wird wurde nicht gefunden."
Kann mir jemand einen Tipp geben, wo das Problem liegen könnte?
Gruss Michael