Driver not loaded with sqlite
This question asked hundred times in the net but it seems this programmer nightmare fear. So, I have problem in loading sqlite when the program executed, I tried many thinks and I end with this:
Main.cpp:
Code:
#include <QApplication>
//#include <qDebug>
#include "store.h"
#include <QtPlugin>
#include <QCoreApplication>
#include <QSqlDriverPlugin>
#include <qsql_sqlite.h>
#include <qsqldriver.h>
#include <QPluginLoader>
int main(int argc, char **argv)
{
Q_IMPORT_PLUGIN(qsqlite)
Store window;
window.show();
return app.exec();
}
Store.pro:
Code:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += items.h store.h \
sales.h \
workers.h
FORMS += Store.ui
SOURCES += items.cpp main.cpp store.cpp \
sales.cpp \
workers.cpp
LIBS += -L"D:\Qt\4.7.4\plugins\sqldrivers" -lqsqlite
QT += sql
QTPLUGIN += qsqlite
CONFIG += debug static
When I compile:
Code:
g++ -mthreads -Wl,-subsystem,windows -o debug\Store.exe debug/items.o debug/main.o debug/store.o debug/sales.o debug/workers.o debug/moc_store.o -L"d:\Qt\4.7.4\lib" -lmingw32 -lqt
maind -LD:\Qt\4.7.4\plugins\sqldrivers -lqsqlite -LD:/Qt/4.7.4/plugins/sqldrivers -lqsqlited -lQtSqld4 -lQtGuid4 -lQtCored4
debug/main.o: In function `StaticqsqlitePluginInstance':
C:\Documents and Settings\Administrator\Desktop\Store-dev/main.cpp:15: undefined reference to `qt_plugin_instance_qsqlite()'
collect2: ld returned 1 exit status
mingw32-make: *** [debug\Store.exe] Error 1
Re: Driver not loaded with sqlite
After many hours of trying different configurations, I end with this:
Code:
configure -release -shared -fast -qt-sql-sqlite -plugin-sql-sqlite -no-qt3support -no-dsp -no-vcproj -opensource -nomake demos -nomake examples -nomake docs -qt-libjpeg -no-openssl -no-openvg -no-style-cde -no-style-cleanlooks -no-style-plastique -no-style-motif -no-phonon -no-phonon-backend -no-multimedia -no-audio-backend -no-stl -no-scripttools -no-script
Also I removed my old dll's run time and replace it with the new one, now my application work perfectly.
Problem solved.
Re: Driver not loaded with sqlite
Quote:
Originally Posted by
SIFE
After many hours of trying different configurations, I end with this:
Code:
configure -release -shared -fast -qt-sql-sqlite -plugin-sql-sqlite -no-qt3support -no-dsp -no-vcproj -opensource -nomake demos -nomake examples -nomake docs -qt-libjpeg -no-openssl -no-openvg -no-style-cde -no-style-cleanlooks -no-style-plastique -no-style-motif -no-phonon -no-phonon-backend -no-multimedia -no-audio-backend -no-stl -no-scripttools -no-script
Also I removed my old dll's run time and replace it with the new one, now my application work perfectly.
Problem solved.
Hi,
I am trying to run the qt application in embedded linux. The application is running fine in my machine (Ubuntu 12.04) but unable to find the driver in embedded linux.
Please help