QMYSQL driver not loaded

本小妞迷上赌 提交于 2019-12-08 06:52:54

问题


I have compiled qmysql driver plugin and placed debug and release .dll and .lib files in \plugins\sqldrivers. But when i try qDebug() << QSqlDatabase::drivers(); it still get ("QSQLITE", "QODBC3", "QODBC", "QPSQL7", "QPSQL")and QMYSQL driver is not available.Any idea?

Qt version : 4.8.4
Compiler : MSVC2010

OS : windows vista (64bit)


回答1:


Your application needs libmysql.dll which you can find in the MySQL installation directory. You can copy it to the Qt bin directory or in the same directory of your .exe

Note that you need to restart your IDE (Qt Creator or what ever IDE) after you place new dll files in \plugins\sqldrivers or Qt bin directory.



来源:https://stackoverflow.com/questions/18077582/qmysql-driver-not-loaded

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!