MySQL driver/plugin and libmysql.dll for Qt5 MSVS2017 64-bit
-
wrote on 4 Apr 2018, 13:47 last edited by dijuna 4 Apr 2018, 14:02This post is deleted!
-
Moderatorswrote on 4 Apr 2018, 15:48 last edited by raven-worx 4 Apr 2018, 15:50
@dijuna
deploy the mysql lib along with the plugin or the exe.... or make sure it's inside the PATH
And that its built using the same compiler of course -
@dijuna
deploy the mysql lib along with the plugin or the exe.... or make sure it's inside the PATH
And that its built using the same compiler of coursewrote on 5 Apr 2018, 09:54 last edited by@raven-worx I believe I'm doing just that. Lets forget about MSVS2017 64-bit kit for now, I'm using default "Desktop Qt 5.10.1 MinGW 32bit" kit just to get it to work. Plugin qsqlmysql.dll file is in C:\Qt\5.10.1\mingw53_32\plugins\sqldrivers (it's where Qt Installer put it, I don't build Qt by my own so it has to be the same compiler) and I was never before moving it anywhere and my application was running. 32-bit libmysql.dll I got with MySQL Installer, by installing 32-bit MySQL Connector/C. After compiling my application, I copy the file to where the EXE is so it's $$OUT_PWD/debug. Still getting the error.
-
@raven-worx I believe I'm doing just that. Lets forget about MSVS2017 64-bit kit for now, I'm using default "Desktop Qt 5.10.1 MinGW 32bit" kit just to get it to work. Plugin qsqlmysql.dll file is in C:\Qt\5.10.1\mingw53_32\plugins\sqldrivers (it's where Qt Installer put it, I don't build Qt by my own so it has to be the same compiler) and I was never before moving it anywhere and my application was running. 32-bit libmysql.dll I got with MySQL Installer, by installing 32-bit MySQL Connector/C. After compiling my application, I copy the file to where the EXE is so it's $$OUT_PWD/debug. Still getting the error.
@dijuna As @raven-worx mentioned most probably the problem is that libmysql.dll was built using a different compiler and therefore is not compatible with your MinGW Qt.
-
@dijuna As @raven-worx mentioned most probably the problem is that libmysql.dll was built using a different compiler and therefore is not compatible with your MinGW Qt.
-
@jsulm but libmysql.dll is provided by Oracle, you don't build it by your own, right? So this problem should occur for everybody using 5.10.1 Qt and 5.7.21 MySQL Server. Noone noticed it just stopped working all of sudden?
@dijuna You apparently didn't try to search here for this issue - it is really not new and didn't stop working all of sudden.
Whether it works or not out of the box depends on the compiler you're using. My guess is that Oracle uses Visual C++ for Windows builds. You're using MinGW - this combination can't work (it isn't a Qt issue). You can build the MySql client library by yourself with MinGW or use Visual C++ compiler on Windows. -
wrote on 5 Apr 2018, 11:21 last edited by
My bad, oh my, it's just a typo... "MYSQL", not "QMYSQL"... sorry.
1/7