[SOLVED] QSqlDatabase: QMYSQL driver not loaded
-
Dear all,
I followed these steps to build QMYSQL driver:
@cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\lib\libmysql.lib" mysql.pro
nmake
copy C:\MYSQL\lib\libmysql.dll %QTDIR%\bin@But I still got the error:
QSqlDatabase: QMYSQL driver not loadedCould you please help me how to fix this issue?
-
Dear Lukas Geyer,
Yes, the following files are modified in /plugins/sqldrivers directory:
- qsqlmysql.lib
- qsqlmysql.prl
Are there any files I miss?
Thank you for your response.
[quote author="Lukas Geyer" date="1343370474"]Has the resulting library been placed in the plugins/sqldrivers directory?[/quote]
-
Dear Lukas Geyer,
Thank you for your instruction.
This issue is solved now.I guess I use wrong "include & lib" path with MySQL Server,
I change to use Connector C (Client?) "include & lib" path and do the same like before.
Now, I can use QMYSQL.Thank you very much.
[quote author="Lukas Geyer" date="1343374724"]qsqlmysql4.dll resp. qsqlmysql4d.dll[/quote]