build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded
-
@cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:
it's another error now
It's same type of error - you have spaces in your paths.
Did you install the client library in a path without spaces?
If so then please start from clean build folder. -
@cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:
because I am italian the name was "programmi"
Yes, Windows tries to hide things from the user :-)
-
@jsulm yeah... now it worked thank you I am so happy, I have been trying to build this driver for 4 days, now it worked and I have the build, now it should work or I have to do anything else? because I tried to instantiate a connection to a database in mysql and it doesn't work, it still says Driver not loaded.
-
@cpplegend Did you also did "make install" step?
To debug plug-in problems you can set QT_DEBUG_PLUGINS variable before running the app and check the output. See https://doc.qt.io/qt-6/debug.html
My guess is that the MySQL client library cannot be found. I'm not sure, but I think you need to copy it to same location as the plug-in. -
@cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:
what should I do now?
Set QT_DEBUG_PLUGINS env variable before starting your app. Either in QtCreator in "Run Environment" of your project or, if you start your app manually in a terminal, using "export QT_DEBUG_PLUGINS=1". Then check the output of the application to see why the plug-in is not loaded.
-
@jsulm said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:
using "export QT_DEBUG_PLUGINS=1".
@cpplegend
Since you are using Windows this would beset QT_DEBUG_PLUGINS=1
in a Command Prompt window. -