Compile output error. Missing library?
-
Hi everyone,
I am creating my first program and I have had some success just until now. When I simulate my program using release, it gives me the following error:
@Error loading "qmfstoragemanagerd.dll" with errorString() "The plugin 'C:/QtSDK/Simulator/Qt/mingw/plugins/contentmanagers/qmfstoragemanagerd.dll' uses incompatible Qt library. Expected build key "Windows mingw release full-config", got "Windows mingw debug full-config""
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.@It will then freeze when I call saveData() under the popupinput class. I do not know if it is my code or my QT creator as I have only installed the basic QT SDK.
Heres my code for the popupinput class:
header:
@#ifndef POPUPINPUT_H
#define POPUPINPUT_H
#include <QDialog>
#include <QLabel>
#include <QFormLayout>
#include <QGridLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QFile>class PopupInput: public QDialog
{
Q_OBJECTpublic:
PopupInput(QWidget *parent = 0);public slots:
void saveData();private:
QPushButton *save;
QPushButton *cancel;
QString station;
QString bus;
QString busStopNumber;
QLineEdit *stationEdit;
QLineEdit *busEdit;
QLineEdit *busStopNumberEdit;};
#endif
@cpp:
@#include <QtGui>
#include "popupinput.h"
#include <QDebug>
#include <QMessageBox>
PopupInput::PopupInput(QWidget *parent)
:QDialog(parent)
{
QLabel *busLabel= new QLabel(tr("Bus:"));
QLabel *stationLabel= new QLabel(tr("Station:"));
QLabel *busStopNumberLabel= new QLabel(tr("Bus Stop Number:"));save=new QPushButton(tr("&Save")); cancel=new QPushButton(tr("&Cancel")); bus=""; station=""; busStopNumber=""; busEdit=new QLineEdit; stationEdit=new QLineEdit; busStopNumberEdit=new QLineEdit; QFormLayout *layout = new QFormLayout; layout->addRow(busLabel, busEdit); layout->addRow(stationLabel,stationEdit); layout->addRow(busStopNumberLabel, busStopNumberEdit); QGridLayout *grid= new QGridLayout; grid->addWidget(cancel,1,0,Qt::AlignRight); grid->addWidget(save,0,0,Qt::AlignRight); layout->addRow(grid); setLayout(layout); connect(save, SIGNAL(clicked()), this, SLOT(saveData())); connect(save, SIGNAL(clicked()), this, SLOT(accept())); connect(cancel, SIGNAL(clicked()), this, SLOT(accept()));
}
void PopupInput::saveData()
{QFile file( "a.txt" ); //QFile file("d://out.txt"); if( !file.exists() ) { file.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&file); out << "This file is generated by Qt\n"; file.close(); qDebug()<<"created"; } else { qDebug()<<"exists"; } file.close();
}
@Thanks in advance
-
I guess it has something to do with your creator installation.
The dll in question is not always part of Qt windows installations. I am using msvc with different versions of Qt and a qmf*.dll cannot be found on my system.
The error message sais that there are incompatible Qt library versions used.
It looks that you have more than one version of Qt installed and there is a mixture of versions.
-
Just saw that the dll in question is probably a debug version. You write that the problem is in release mode. That is probably the problem.
The error sais that loading "qmfstoragemanagerd.dll" is the problem. The 'd' at the library name's end should indicate a debug version.
What puzzles me is that the name does not end with '4' as all my dlls for msvc do.