franco.amato
26th July 2010, 23:03
Hi to all,
I'm getting error with qt plugins and visual studio 2005.
This is the code:
#include "LayoutEditor.h"
#include "LoginDialog.h"
#include "OfficesDialog.h"
#include <QtCore/QtPlugin>
#include <QtGui/QtGui>
#include <QtGui/QApplication>
#include <QtGui/QCleanlooksStyle>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QtGui/QMessageBox>
#include <QtCore/QSettings>
#include <QtCore/QFile>
#include "Common.h"
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qmng)
Q_IMPORT_PLUGIN(qtiff)
Q_IMPORT_PLUGIN(qsqlodbc)
QTextStream g_log;
bool connectToDB()
{
QSettings settings("EditorGrafico.remote.ini", QSettings::IniFormat);
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setHostName(settings.value("db_hostname").toString());
db.setDatabaseName(settings.value("db_name").toString());
db.setUserName(settings.value("db_username").toString());
db.setPassword(settings.value("db_userpass").toString());
return db.open();
}
and this is the error I got:
Error 1 error LNK2019: sÃ*mbolo externo "class QObject * __cdecl qt_plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ) sin resolver al que se hace referencia en la función "public: __thiscall StaticqjpegPluginInstance::StaticqjpegPluginInstan ce(void)" (??0StaticqjpegPluginInstance@@QAE@XZ) main.obj
I work with visual studio 2005 and Qt 4.6.3 without pro file.
I hope to get help.
Best Regards,
Franco
I'm getting error with qt plugins and visual studio 2005.
This is the code:
#include "LayoutEditor.h"
#include "LoginDialog.h"
#include "OfficesDialog.h"
#include <QtCore/QtPlugin>
#include <QtGui/QtGui>
#include <QtGui/QApplication>
#include <QtGui/QCleanlooksStyle>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QtGui/QMessageBox>
#include <QtCore/QSettings>
#include <QtCore/QFile>
#include "Common.h"
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qmng)
Q_IMPORT_PLUGIN(qtiff)
Q_IMPORT_PLUGIN(qsqlodbc)
QTextStream g_log;
bool connectToDB()
{
QSettings settings("EditorGrafico.remote.ini", QSettings::IniFormat);
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setHostName(settings.value("db_hostname").toString());
db.setDatabaseName(settings.value("db_name").toString());
db.setUserName(settings.value("db_username").toString());
db.setPassword(settings.value("db_userpass").toString());
return db.open();
}
and this is the error I got:
Error 1 error LNK2019: sÃ*mbolo externo "class QObject * __cdecl qt_plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ) sin resolver al que se hace referencia en la función "public: __thiscall StaticqjpegPluginInstance::StaticqjpegPluginInstan ce(void)" (??0StaticqjpegPluginInstance@@QAE@XZ) main.obj
I work with visual studio 2005 and Qt 4.6.3 without pro file.
I hope to get help.
Best Regards,
Franco