Qt MySql Drivers Mess.
-
Hi My Gurus.
I'm new to Qt but after writing flew small GUI programs I'm in love with it, but my love isn't without hard times to.
Ok to the core ... I decided my new app need a connection to MySql database, after a long day of terror with MinGW32, missing includes etc. I'm managed to compile correct Driver for Qt 5.1. It works :).
All was fine to moment when I tried to deploy main little app.
Normally I will used 4.8.5 to deploy but because I'm compiled a driver for 5.1 I'm stick to it.
It turns one of libs libstdc++-6.lib bring a fight, I found i have 4 version of this lib, and any want work.
I copy one after another to MinGW and qt to compile against this correct to run this thing but no luck.
Ok Im decided to give its one more go. on another PC I'm downloaded fresh Qt 5.2
and opened project in it, compiling first drivers for it.
and there is a problemthis statement in my 5.1 working ok in 5.2 compiler trowing a error.
QSqlDatabase db = QsqlDatabase::addDatabase;d:\ssd\QtP\Fleet-Tool\mysqldialog.h:47: error: 'QsqlDatabase' has not been declared
but in 5.1 no problem ?
when I use this
QSqlDatabase db;
and next
db.addDatabase;
compiler not protesting but program when run trowing no driver loaded ?A question from other barrel.
Why some plug-ins can't be easily accessible in installation or there is no ready compiled versions of them ?And why there is no automatic deploying system for Windows & Linux ? it can easily just copy required files to release folder ?
thx Ar2ur
-
Ok My bad :) I found solution.
error was result of numb mistake, I installed new Qt 5.2 but it configure itself with my old Qt 4.8.5, after switching to 5.2 it compile ok.
Secondary Big THANK YOU to DIGA for shipping MySql drivers along with Qt. Qt5.2 has all libs and dll's with it no more compilation headache.
now i need to solve this libsdc++-6.lib problem ;/
-
libsdc++-6.dll should come with the package of Qt5.2, are you trying to ship the exe to anthoer computer?Or you forgot to update your environment path?
ps : the mysql driver of Qt need depend on libmysql.dll
-
Yes I'm tried to ship it problem was libdc++-6.lib was somewhere in system paths and even if i put correct one in a folder with application other was used. After editing paths seems to working fine :).
Question? there is any way to force application to search first in installation folder for those libs in case something like that happens on other machine ?