PDA

View Full Version : Qt 4.4.0 + MinGW + MySQL installation problem



jambrek
28th November 2008, 13:58
Hello,

I'm using Qt 4.4.0 (opensource) with MinGW and I have to work with MySQL 5.x. I consulted this document: http://www.jiggerjuice.net/software/qt-sql-drivers.html and I done everything exept MySQL Embedded Server.
I configured Qt with: configure.exe -debug-and-release -stl -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -qmake
-qt-sql-sqlite -qt-sql-mysql -l mysql -I c:\MySQL\src\include -L c:\MySQL\lib\opt
-platform win32-g++
and build it.

After this my application works with mysql server, but when I copy my app to another computer it didn't work. Possible some dll-s are missing. When I copy my app (exe file) to another computer I also copy these files:
libmySQL.dll
mingwm10.dll
QtCore4.dll
QtGui4.dll
QtNetwork4.dll
QtSql4.dll
QtXml4.dll

When I star my app on another PC it work fine exept connection with database. For connection with database I'm using QSqlDatabase class, and when I enter connections parameters on my PC, class QSqlDatabase accept these parameters, but when I enter same parameters on other PC, class could not accept these parameters and could not establish connection with database.

Should I copy some other dll or something else, or build some libreries staticly and implement it in my exe file?
What should I do to make my application work on other PC?

Thanks!

sadjoker
29th November 2008, 10:51
Try to make directory "sqldrivers" in the program`s dir and put there the dlls from "C:\Qt\4.4.3\plugins\sqldrivers"

In your case you`ll probably need qsqlmysql4.dll and qsqlmysqld4.dll. Hope it works.

jambrek
1st December 2008, 11:02
It's works! Thank you a lot!