Unsolved How to install MySQL to (or with) Static Version
-
Dear all,
i know there are some topics about this already, however after two days of trying all i could (mainly I was not aware what Im doing, so maybe i did it wrong), therefore if I can kindly ask you not to link me to other similar topics, please try to give me real example of what to try...
So at the beginning, I have build stativ version of MinGW 32b, using the script from here and using batch file:
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\Qt\windows-build-qt-static.ps1' -QtSrcUrl 'c:\Downloads\From Browser\qt-everywhere-src-5.12.3.zip' -QtStaticDir 'C:\Qt' -MingwDir 'C:\Qt\Tools\mingw730_32' -QtVersion '5.12.3_Static'
basicaly I followed this guide:
youtube videobut now I am finding the MYSQL driver is not available in this new static version:
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3I have tried to install new static version modifying the batch file:
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\Qt\windows-build-qt-static.ps1' -QtSrcUrl 'c:\Downloads\From Browser\qt-everywhere-src-5.12.3.zip' -QtStaticDir 'C:\Qt' -MingwDir 'C:\Qt\Tools\mingw730_32' -QtVersion '5.12.3_Static_MySQL' -sql-qt-mysql -l mysql -I C:\MySQL\include -L C:\MySQL\lib
however Im getting error:
C:\Qt\windows-build-qt-static.ps1 : A parameter cannot be found that matches parameter name 'sql-mysql'.
(i have tride to modify this command with many variants i couild find online (-sql-qt-mysql, -mysql, ...) but still same error...So bck to my question,
please give me suggestion how to install mysql driver into this stable version, or even when it would mean to install the stable version again with mysql in it, then its fine...Thank you for every single suggestion for me to try, cause ive been trying to figure out last 3 days with no luck
-
Hi,
What does windows-build-qt-static.ps1 contain ?
-
-
For SQLite you can choose whether you use Qt's bundled version or the one from your system but for the other backends, you have to get the packages for them, hence you only have the
-sql-XXX
options. -
@SGaist said in How to install MySQL to (or with) Static Version:
you have to get the packages for them, hence you only have the
-sql-XXX
options.Thanks, this was what I was realy expectiong, but I was hoping to guide me up a little, because what I have tried is to follow this guide:
https://www.seppemagiels.com/blog/create-mysql-driver-qt5-windows
but durring that I have few errors when opening mysql.pro in Qt. But following this guide i have only one error of Project ERROR: Library 'mysql' is not defined. which according to bug report it should be fixed by commenting line QMAKE_USE += mysql then no error followed but dlls were not created anyway :( -
You should also read the MySQL build guide in Qt's documentation. They show the syntax you should use.