[solved] Qt 5.0 MySQL driver compile and find, but not load
-
I'm trying to use the Qt 5.0 MySQL driver with Visual Studio 10.0 compiler, but some strange behaviour happens when I load it. Adding a MySQL database with the code:
@
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
@I receive the warning below. It's the same generated with QMYSQL3.
@
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3
@Apparently Qt's plugin system correct find it, but for some reason can't load.
The plugin was build in accordance with the sql-driver.html doc as follow at Windows 32 and 64 bit using MySQL 5.5.29 (32 bit).
@
cd C:\Qt\5.0.0\5.0.0\Src\qtbase\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:/MySQL/lib/libmysql.lib" mysql.pro
nmake
nmake install
@Has anybody encontered the same problem?
-
Hi,
MySQL was installed in
@C:\MySQL@
The plugin is created successfully and Qt finds.
Update: I found a guy with the same "issue":http://stackoverflow.com/questions/14207088/qt-5-odbc-driver-issue in ODBC driver.
-
Very basic failure. I forgot to copy libmysql.dll in application folder.
Thanks for replay :)
-