Building database driver, IT difficulties
-
@SPlatten said in Building database driver, IT difficulties:
I'm not sure:
I don't understand why you ask for help and don't try out what people told you to do.
I have used "MySQL Connector/C 6.1.5" and it works fine.
You try to use MariaDB Connector and qmake do NOT enable MySQL plugin.So up to you to continue on this way or to do what I told you to do.
-
@KroMignon , I downloaded and installed the MySQL connector, selecting version 6.1.5, same problem, it does not connect.
Initialising application core... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "className": "QWindowsDirect2DIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "className": "QWindowsDirect2DIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("direct2d") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("windows") QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platforms" ... loaded library "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/styles" ... Connecting to database... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "className": "QSQLiteDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "className": "QSQLiteDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QSQLITE") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QMYSQL3", "QMYSQL" ] }, "className": "QMYSQLDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QMYSQL3", "QMYSQL" ] }, "className": "QMYSQLDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QMYSQL3", "QMYSQL") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "className": "QODBCDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "className": "QODBCDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QODBC3", "QODBC") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "className": "QPSQLDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "className": "QPSQLDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QPSQL7", "QPSQL") QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/sqldrivers" ... Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found. QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\\Qt\\Qt5.9.2\\5.9.2\\msvc2015\\plugins\\sqldrivers\\qsqlmysqld.dll: The specified module could not be found." QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
I just checked the path:
C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers
Whilst this folder does contain 12 files, 8 of these files in this folder have an up to date timestamp, except:
qsqlmysql.dll qsqlmysqld.dll qsqlpsql.dll qsqlpsqld.dll
Which all have a date timestamp of:
02/10/2017 07:06
-
@SPlatten said in Building database driver, IT difficulties:
QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/sqldrivers" ...
Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.
I downloaded and installed the MySQL connector, selecting version 6.1.5, same problem, it does not connect.
Do did you do exactly?
- Did you re-run
qmake
with right parameters? - Did you check if MySQL plugin is now enabled?
- did you run "nmake clean & nmake build & nmake installl" ?
You seems to like batch file, it should look like this:
echo Cleaning cache @rm -R config.* echo Calling vcvarsall.bat @call "c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" echo Configure Qt @call "c:/Qt/Qt5.9.2/5.9.2/msvc2015/bin/qtenv2.bat" echo Running qmake @qmake -- MYSQL_INCDIR="c:/mysql-connector-6.1.5/include" MYSQL_LIBDIR="c:/mysql-connector-6.1.5/lib" @rem I add a pause here to be able to check if MySQL plugin is enabled @pause echo Clean old build @nmake clean echo Running nmake @nmake echo Running nmake install @nmake install
EDIT: add nmake clean to ensure (re)build will be done
- Did you re-run
-
@SPlatten said in Building database driver, IT difficulties:
"The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release
Did you notice this?
-
@KroMignon , I downloaded the MSI install for the mysql connector 6.1.5 and used it to install, I don't see the path:
c:\mysql-connector-6.1.5
I found it in:
C:\Program Files (x86)\MySQL\MySQL Connector C 6.1
Modify batch file with correct paths and run. qsqlmysql.dll and qsqlmysqld.dll now have up to date timestamps. Rebuilt project and run in Qt Creator:
Initialising application core... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "className": "QWindowsDirect2DIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "direct2d" ] }, "className": "QWindowsDirect2DIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("direct2d") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("windows") QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platforms" ... loaded library "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/styles" ... Connecting to database... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "className": "QSQLiteDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "className": "QSQLiteDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QSQLITE") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QMYSQL3", "QMYSQL" ] }, "className": "QMYSQLDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QMYSQL3", "QMYSQL" ] }, "className": "QMYSQLDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QMYSQL3", "QMYSQL") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "className": "QODBCDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "className": "QODBCDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QODBC3", "QODBC") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "className": "QPSQLDriverPlugin", "debug": false, "version": 329986 } "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll" Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "className": "QPSQLDriverPlugin", "debug": true, "version": 329986 } Got keys from plugin meta data ("QPSQL7", "QPSQL") QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/sqldrivers" ... Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found. QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\\Qt\\Qt5.9.2\\5.9.2\\msvc2015\\plugins\\sqldrivers\\qsqlmysqld.dll: The specified module could not be found." QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Still no joy. As mentioned above the path:
C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers
Now contains build dll's for both qsqlmysql.dll and qsqlmysqld.dll with up to date timestamps.
-
@SPlatten said in Building database driver, IT difficulties:
Modify batch file with correct paths and run. qsqlmysql.dll and qsqlmysqld.dll now have up to date timestamps. Rebuilt project and run in Qt Creator:
You partially reply to my question:
- did you check if MySQL plugin build is enabled after
qmake
? - according to debug output, the plugin is not available in debug mode. So qsqlmysqld.dll seems not to by copied to to right place. Are you sure
nmake install
has been done without errors?
[EDIT]
Are you sure thatlibmysql.dll
is in the PATH?
I would recommend you to copy this dll fromC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib
toC:\Qt\Qt5.9.2\5.9.2\msvc2015\bin
- did you check if MySQL plugin build is enabled after
-
@KroMignon , output from running:
$ c:/Qt/Qt5.9.2/5.9.2/msvc2015/bin/qmake Running configuration tests... Done running configuration tests. Configure summary: Qt Sql: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. yes OCI (Oracle) ........................... no ODBC ................................... yes PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt is now configured for building. Just run 'nmake'. Once everything is built, Qt is installed. You should NOT run 'nmake install'. Note that this build cannot be deployed to other machines or devices. Prior to reconfiguration, make sure you remove any leftovers from the previous build.