Qt MySQL Driver Mingw32-make not working
-
@hobbyProgrammer said in Qt MySQL Driver Mingw32-make not working:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
Then either you haven't provided the correct paths to the mysql headers and libraries or they're incompatible for some reason (e.g. they're 32bits while your compiler is 64bits or vice versa).
-
@kshegunov alright, I managed to get it right on my PC, but I'd also like to have it on my laptop. The reimp worked and the MySQL folder\lib now contains libmysql.def and libmysql.a, however whenever I run configure.exe it doesn't work.
configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql -l mysql -I C:\MySQL\include -L C:\MySQL\lib
gives me this:
Bootstrapping qmake ... mingw32-make: Nothing to be done for 'first'. ERROR: Invalid value given for boolean command line option 'sql-mysql'. ERROR: Unknown command line option '-l'.
-
Hi,
As the error text suggests, remove that -l option. The configure script doesn't support it. It only wants the include and library paths.
-
@hobbyProgrammer Can you show your current configure call?
-
i tried:
configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql -I C:\MySQL\include -L C:\MySQL\lib
which gave me this error:
ERROR: Invalid value given for boolean command line option 'sql-mysql'.
configure.exe -debug-and-release -platform win32-g++ -sql-mysql -I C:\MySQL\include -L C:\MySQL\lib
which gave me this error:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
-
@hobbyProgrammer It should be -sql-mysql
Check the configure log to see what exactly is missing. -
I still don't understand why you try to compile Qt just to create the mysql plugin...
-
@Christian-Ehrlicher I am following this tutorial:
https://forum.qt.io/topic/40672/how-to-create-the-plugin-of-mysql-for-qt/34Should I just do the qmake for the sqldriver? or what else do you recommend?
so only qmake "MYSQL_INCDIR+=<path>" "MYSQL_LIBS+=<path>" ?
-
@jsulm Hi,
There's so much there...
I managed to get it down to this:
None of [libgds32_ms.dll.a libgds32_ms.a gds32_ms.dll.a gds32_ms.a gds32_ms.lib] found in [] and global paths. => source produced no result. Trying source 1 (type inline) of library ibase ... => source failed condition '!config.win32'. test config.qtbase_sqldrivers.libraries.ibase FAILED loaded result for library config.qtbase_sqldrivers.libraries.mysql Trying source 0 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 1 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 2 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 3 (type mysqlConfig) of library mysql ... mysql_config not found. => source produced no result. Trying source 4 (type inline) of library mysql ... => source failed condition '!config.win32'. Trying source 5 (type inline) of library mysql ...