Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build MySQL plugin - cannot run compiler error



  • Hi,

    I've been trying to build the MySQL plugin on Windows 10 using this link: https://doc.qt.io/qt-5/sql-driver.html#building-the-drivers

    However, while trying to tell Qt the path to the include and lib directories, I run into an error.

    The command prompt code I used was this:
    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>"C:\Programming\5.15.0\mingw81_32\bin\qmake.exe" -- MYSQL_INCDIR="C:\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\MySQL\MySQLServer8.0\lib"

    It gives me this error:
    Project ERROR: Cannot run compiler 'g++'. Output:

    ===================
    Maybe you forgot to setup the environment?

    I've tried checking what the issue could be by checking my kits, Qt versions, and compilers from the "Manage Kits" menu. It looks like both the 32bit and 64bit versions of MinGW are installed correctly, as no issues are being shown. From reading other forum posts, it looks like this error is mainly causing by using incompatible versions of compilers or having issues with the compiler setup, but from what I can see it all looks fine. And I can run my app normally using those MinGW compilers, just that I can't connect to MySQL.

    Could someone help with this issue? I'm not very proficient in command line code and compiling.

    Thanks!



  • @chihwah
    It probably means the modules it depends on could not be found. :)
    Actually it needs vs2015 runtimes, I'm not sure if it would be installed with vs2019.
    You don't need to install the whole visual studio, the redistributable package would be enough.
    The doc provides a link of vcredist.exe, you can install that. Remember to choose the x64 version.
    For openssl ones, if you don't have v1.1+ installed to PATH, you can copy libssl-1_1-x64.dll and libcrypto-1_1-x64.dll from MySQL bin folder to let them be with libmysql.dll.
    The dependencies can be really annoying, so I prefer to use older versions of mysql without those dependencies.


  • Qt Champions 2019

    @chihwah Use the CMD shortcut from start menu for your Qt set-up - it will set everything up.



  • Thanks for the response! How do I do that access the cmd shortcut from the start menu? The start menu of Qt or my laptop? Afraid I'm not very good at compiling and building or anything related to CMD - still learning!


  • Qt Champions 2019

    @chihwah said in Build MySQL plugin - cannot run compiler error:

    The start menu of Qt or my laptop?

    yes



  • @chihwah
    Start -> Qt -> Qt 5.15.0 (MinGW 8.1.0 32-bit)



  • thanks both! I've tried running the same code again but this time on the MinGW folder:
    C:\Programming\5.15.0\mingw81_32>"C:\Programming\5.15.0\mingw81_32\bin\qmake.exe" -- MYSQL_INCDIR="C:\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\MySQL\MySQLServer8.0\lib"

    But it just gives me the same message as if I typed in:
    "qmake -help"


  • Qt Champions 2019

    @chihwah said in Build MySQL plugin - cannot run compiler error:

    but this time on the MinGW folder

    This is just wrong - how should qmake know what you want to build?
    Create a build folder.
    Change to this folder.
    Call qmake but give it the path to the sources you want to build (C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\NAME_OF_THE_PRO_FILE.pro)



  • @chihwah

    • Start -> Qt -> Qt 5.15.0 (MinGW 8.1.0 32-bit)
    • cd "C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers"
    • qmake -- MYSQL_INCDIR="C:\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\MySQL\MySQLServer8.0\lib"


  • @jsulm and @Bonnie thanks. @Bonnie you are a champ, that worked! I thought I was doing something similar but apparently I wasn't.

    MySQL still doesn't work on my app though. I know it worked previously when I installed MySQL on my Mac, but since I've moved over to Windows it's been a hassle all over again.

    I tried running mingw32-make sub-mysql as the instructions said, but it gave me this error now:
    mingw32-make: *** No rule to make target 'sub-mysql'. Stop.

    Apologies if I am asking some dumb questions - I acknowledge I am a noob at this, but trying my best!


  • Qt Champions 2019

    This post is deleted!

  • Qt Champions 2019

    @chihwah Was qmake call really successful?
    What happens if you only do "mingw32-make"?
    Also the problem could be that you already called qmake before, so now you have artefacts in the source tree. That is why I suggested to do out of source build (create a build folder step).



  • @chihwah
    What's the output of qmake?
    Do you have a "yes" on the right of "MySql"?

    Sure a separate build folder is better, but the plugin projects are a bit different from normal ones.
    So for newbies, I prefer to let them run commands according to the doc...



  • @Bonnie it says no for both the configuration tests and Sql drivers:
    Info: creating stash file C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers.qmake.stash

    Running configuration tests...
    Checking for DB2 (IBM)... no
    Checking for InterBase... no
    Checking for MySQL... no
    Checking for OCI (Oracle)... no
    Checking for ODBC... yes
    Checking for PostgreSQL... no
    Checking for SQLite (version 2)... no
    Checking for TDS (Sybase)... no
    Done running configuration tests.

    Configure summary:

    Qt Sql Drivers:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    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 'mingw32-make'.
    Once everything is built, you must run 'mingw32-make install'.
    Qt will be installed into 'C:\Programming\5.15.0\mingw81_32'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.

    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>nmake sub-mysql
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>mingw32-make sub-mysql
    mingw32-make: *** No rule to make target 'sub-mysql'. Stop.

    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\MySQL\MySQLServer8.0\lib"

    Running configuration tests...
    Checking for DB2 (IBM)... no
    Checking for InterBase... no
    Checking for MySQL... no
    Checking for OCI (Oracle)... no
    Checking for ODBC... yes
    Checking for PostgreSQL... no
    Checking for SQLite (version 2)... no
    Checking for TDS (Sybase)... no
    Done running configuration tests.

    Configure summary:

    Qt Sql Drivers:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    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 'mingw32-make'.
    Once everything is built, you must run 'mingw32-make install'.
    Qt will be installed into 'C:\Programming\5.15.0\mingw81_32'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.

    Separately, can someone recommend a resource I can read to learn more about building and compiling? That would help me rebuild the plugin for the build folder. I can't really understand how to do an out of source build. I can see a build folder for my project, but not sure what commands to use to run qmake over that build folder.

    Would like to learn more about how all of this works so I can troubleshoot my own problems. I've tried reading numerous Qt documentation and forum posts, but it doesn't seem to help me much because there's quite a bit of presumed knowledge and I don't have a computing background.



  • @chihwah

    1. Make sure there is a mysql.h file in the MYSQL_INCDIR folder (in your case it is "C:\MySQL\MySQLServer8.0\include") and a libmysql.lib file in the MYSQL_LIBDIR folder.
    2. Delete the config.log and config.cache file in the "C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers"
      Then run the qmake command again, if you still get no for mysql, post your newly generated "config.log".


  • @Bonnie thanks... I had previously tried to delete config.cache and reran but it still didn't work. This time I deleted both config.cache and config.log and it still says no. I've checked and those files are definitely in those directories. My config log is:
    Command line: "MYSQL_INCDIR=C:\MySQL\MySQLServer8.0\include" "MYSQL_LIBDIR=C:\MySQL\MySQLServer8.0\lib"
    Global lib dirs: [C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-win32\lib C:\Utils\postgresql\pgsql\lib] [C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0 C:/Programming/Tools/mingw810_32/lib/gcc C:/Programming/Tools/mingw810_32/i686-w64-mingw32/lib C:/Programming/Tools/mingw810_32/lib]
    Global inc dirs: [C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-win32\include C:\Utils\postgresql\pgsql\include] [C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include C:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed C:/Programming/Tools/mingw810_32/i686-w64-mingw32/include]
    looking for library db2
    Trying source 0 (type inline) of library db2 ...
    sqlcli.h not found in [] and global paths.
    sqlcli1.h not found in [] and global paths.
    => source produced no result.
    Trying source 1 (type inline) of library db2 ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.db2 FAILED
    looking for library ibase
    Trying source 0 (type inline) of library ibase ...
    ibase.h not found in [] and global paths.
    => source produced no result.
    Trying source 1 (type inline) of library ibase ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.ibase FAILED
    looking for library 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 ...

    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Programming\5.15.0\mingw81_32\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-win32\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-win32\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = -LC:\MySQL\MySQLServer8.0\lib -llibmariadb" "QMAKE_INCDIR_MYSQL = C:\MySQL\MySQLServer8.0\include" C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

    del main.o
    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-win32\include -IC:\Utils\postgresql\pgsql\include -IC:\MySQL\MySQLServer8.0\include -IC:\Programming\5.15.0\mingw81_32\mkspecs\win32-g++ -o main.o main.cpp
    g++ -Wl,-s -Wl,-subsystem,console -mthreads -o mysql.exe main.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-win32\lib -LC:\Utils\postgresql\pgsql\lib -LC:\MySQL\MySQLServer8.0\lib -llibmariadb
    C:/Programming/Tools/mingw810_32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibmariadb
    collect2.exe: error: ld returned 1 exit status
    mingw32-make: *** [Makefile:69: mysql.exe] Error 1
    => source failed verification.
    Trying source 6 (type inline) of library mysql ...

    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Programming\5.15.0\mingw81_32\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-win32\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-win32\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = -LC:\MySQL\MySQLServer8.0\lib -llibmysql" "QMAKE_INCDIR_MYSQL = C:\MySQL\MySQLServer8.0\include" C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

    del main.o
    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-win32\include -IC:\Utils\postgresql\pgsql\include -IC:\MySQL\MySQLServer8.0\include -IC:\Programming\5.15.0\mingw81_32\mkspecs\win32-g++ -o main.o main.cpp
    g++ -Wl,-s -Wl,-subsystem,console -mthreads -o mysql.exe main.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-win32\lib -LC:\Utils\postgresql\pgsql\lib -LC:\MySQL\MySQLServer8.0\lib -llibmysql
    main.o:main.cpp:(.text.startup+0xc): undefined reference to `mysql_get_client_version@0'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make: *** [Makefile:69: mysql.exe] Error 1
    => source failed verification.
    Trying source 7 (type inline) of library mysql ...
    => source failed condition '!config.win32'.
    Trying source 8 (type inline) of library mysql ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.mysql FAILED
    looking for library oci
    Trying source 0 (type inline) of library oci ...
    oci.h not found in [] and global paths.
    => source produced no result.
    Trying source 1 (type inline) of library oci ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.oci FAILED
    looking for library odbc
    Trying source 0 (type inline) of library odbc ...

    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && C:\Programming\5.15.0\mingw81_32\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-win32\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-win32\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += odbc" "QMAKE_LIBS_ODBC = -lodbc32" C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/odbc
    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

    del main.o
    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-win32\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_32\mkspecs\win32-g++ -o main.o main.cpp
    g++ -Wl,-s -Wl,-subsystem,console -mthreads -o odbc.exe main.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-win32\lib -LC:\Utils\postgresql\pgsql\lib -lodbc32
    => source accepted.
    test config.sqldrivers.libraries.odbc succeeded
    looking for library psql
    Trying source 0 (type pkgConfig) of library psql ...
    pkg-config use disabled globally.
    => source produced no result.
    Trying source 1 (type psqlConfig) of library psql ...
    pg_config not found.
    => source produced no result.
    Trying source 2 (type psqlEnv) of library psql ...
    libpq-fe.h not found in [] and global paths.
    => source produced no result.
    Trying source 3 (type psqlEnv) of library psql ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.psql FAILED
    looking for library sqlite2
    Trying source 0 (type inline) of library sqlite2 ...
    sqlite.h not found in [] and global paths.
    => source produced no result.
    test config.sqldrivers.libraries.sqlite2 FAILED
    looking for library tds
    Trying source 0 (type sybaseEnv) of library tds ...

    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && C:\Programming\5.15.0\mingw81_32\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-win32\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-win32\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += tds" "QMAKE_LIBS_TDS = -lNTWDBLIB" C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
    • cd /d C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

    del main.o
    Could Not Find C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds\main.o
    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-win32\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_32\mkspecs\win32-g++ -o main.o main.cpp
    main.cpp:2:10: fatal error: sybfront.h: No such file or directory
    #include <sybfront.h>
    ^~~~~~~~~~~~
    compilation terminated.
    mingw32-make: *** [Makefile:496: main.o] Error 1
    => source failed verification.
    Trying source 1 (type sybaseEnv) of library tds ...
    => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.tds FAILED

    I've tried looking up some of these errors yesterday but couldn't figure out what's causing it. From what I can see all the files are in the directories that I've directed qmake to.



  • @chihwah
    The config.log does not affect the result, I just want to make sure you post the most updated info. :)
    I kind of get it.
    The mysql 8.0 only has 64bit version and you are using 32bit MinGW, so the linking failed.
    Did you also install the "MinGW 8.1.0 64-bit" version of Qt? Use that instead.
    And if you need to use 32bit, then use older versions of mysql.



  • @Bonnie that worked! can't believe it was bit version that caused it to trip up - I thought I had checked that.

    So I continued following the instructions and ran mingw32-make install, then ran mingw32-make sub-mysql, then ran mingw32-make install again. Then I built my program in Qt using the MinGW 64-bit kit, but it still says QMySQL Driver not loaded.

    Thanks heaps for your help so far - I feel like it's very nearly there, but I must be missing something else.

    I've put the cmd results below if that helps:
    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>mingw32-make install
    cd mysql\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\mysql\mysql.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\MySQL\MySQLServer8.0\include -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\qsql_mysql.o qsql_mysql.cpp
    g++ -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -dM -E -o .moc\release\moc_predefs.h C:\Programming\5.15.0\mingw81_64\mkspecs\features\data\dummy.cpp
    C:\Programming\5.15.0\mingw81_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB --include C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql/.moc/release/moc_predefs.h -IC:/Programming/5.15.0/mingw81_64/mkspecs/win32-g++ -IC:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0/QtCore -IC:/Programming/5.15.0/mingw81_64/include -IC:/Programming/5.15.0/mingw81_64/include/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed -IC:/Programming/Tools/mingw810_32/i686-w64-mingw32/include main.cpp -o .moc\release\main.moc
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\MySQL\MySQLServer8.0\include -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\main.o main.cpp
    C:\Programming\5.15.0\mingw81_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB --include C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql/.moc/release/moc_predefs.h -IC:/Programming/5.15.0/mingw81_64/mkspecs/win32-g++ -IC:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0/QtCore -IC:/Programming/5.15.0/mingw81_64/include -IC:/Programming/5.15.0/mingw81_64/include/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed -IC:/Programming/Tools/mingw810_32/i686-w64-mingw32/include qsql_mysql_p.h -o .moc\release\moc_qsql_mysql_p.cpp
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\MySQL\MySQLServer8.0\include -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\moc_qsql_mysql_p.o .moc\release\moc_qsql_mysql_p.cpp
    windres -i qsqlmysql_resource.rc -o .obj\release\qsqlmysql_resource_res.o --include-dir=. -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB
    g++ -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\libqsqlmysql.a -o ..\plugins\sqldrivers\qsqlmysql.dll .obj/release/qsql_mysql.o .obj/release/main.o .obj/release/moc_qsql_mysql_p.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib C:\Programming\5.15.0\mingw81_64\lib\libQt5Sql.a C:\Programming\5.15.0\mingw81_64\lib\libQt5Core.a -LC:\MySQL\MySQLServer8.0\lib -llibmysql .obj\release\qsqlmysql_resource_res.o
    objcopy --only-keep-debug ../plugins/sqldrivers/qsqlmysql.dll ../plugins/sqldrivers/qsqlmysql.dll.debug && objcopy --strip-debug ../plugins/sqldrivers/qsqlmysql.dll && objcopy --add-gnu-debuglink=../plugins/sqldrivers/qsqlmysql.dll.debug ../plugins/sqldrivers/qsqlmysql.dll
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlmysql.dll.debug C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlmysql.dll C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake C:\Programming\5.15.0\mingw81_64\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    cd odbc\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\qsql_odbc.o qsql_odbc.cpp
    g++ -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -dM -E -o .moc\release\moc_predefs.h C:\Programming\5.15.0\mingw81_64\mkspecs\features\data\dummy.cpp
    C:\Programming\5.15.0\mingw81_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB --include C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc/.moc/release/moc_predefs.h -IC:/Programming/5.15.0/mingw81_64/mkspecs/win32-g++ -IC:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0/QtCore -IC:/Programming/5.15.0/mingw81_64/include -IC:/Programming/5.15.0/mingw81_64/include/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed -IC:/Programming/Tools/mingw810_32/i686-w64-mingw32/include main.cpp -o .moc\release\main.moc
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\main.o main.cpp
    C:\Programming\5.15.0\mingw81_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB --include C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc/.moc/release/moc_predefs.h -IC:/Programming/5.15.0/mingw81_64/mkspecs/win32-g++ -IC:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtSql/5.15.0/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0 -IC:/Programming/5.15.0/mingw81_64/include/QtCore/5.15.0/QtCore -IC:/Programming/5.15.0/mingw81_64/include -IC:/Programming/5.15.0/mingw81_64/include/QtSql -IC:/Programming/5.15.0/mingw81_64/include/QtCore -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++ -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32 -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/backward -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include -IC:/Programming/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include-fixed -IC:/Programming/Tools/mingw810_32/i686-w64-mingw32/include qsql_odbc_p.h -o .moc\release\moc_qsql_odbc_p.cpp
    g++ -c -fno-keep-inline-dllexport -O2 -g -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtSql\5.15.0\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0 -IC:\Programming\5.15.0\mingw81_64\include\QtCore\5.15.0\QtCore -IC:\Programming\5.15.0\mingw81_64\include -IC:\Programming\5.15.0\mingw81_64\include\QtSql -IC:\Programming\5.15.0\mingw81_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Programming\5.15.0\mingw81_64\mkspecs\win32-g++ -o .obj\release\moc_qsql_odbc_p.o .moc\release\moc_qsql_odbc_p.cpp
    windres -i qsqlodbc_resource.rc -o .obj\release\qsqlodbc_resource_res.o --include-dir=. -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB
    g++ -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\libqsqlodbc.a -o ..\plugins\sqldrivers\qsqlodbc.dll .obj/release/qsql_odbc.o .obj/release/main.o .obj/release/moc_qsql_odbc_p.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib C:\Programming\5.15.0\mingw81_64\lib\libQt5Sql.a C:\Programming\5.15.0\mingw81_64\lib\libQt5Core.a -lodbc32 .obj\release\qsqlodbc_resource_res.o
    objcopy --only-keep-debug ../plugins/sqldrivers/qsqlodbc.dll ../plugins/sqldrivers/qsqlodbc.dll.debug && objcopy --strip-debug ../plugins/sqldrivers/qsqlodbc.dll && objcopy --add-gnu-debuglink=../plugins/sqldrivers/qsqlodbc.dll.debug ../plugins/sqldrivers/qsqlodbc.dll
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlodbc.dll.debug C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlodbc.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlodbc.dll C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlodbc.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Programming\5.15.0\mingw81_64\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    cd sqlite\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    C:\Programming\5.15.0\mingw81_32\bin\qmake.exe -o Makefile sqlite.pro
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    C:\Programming\5.15.0\mingw81_32\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlite.dll.debug C:\Programming\5.15.0\mingw81_32\plugins\sqldrivers\qsqlite.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlite.dll C:\Programming\5.15.0\mingw81_32\plugins\sqldrivers\qsqlite.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_32\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Programming\5.15.0\mingw81_32\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'

    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>mingw32-make sub-mysql
    cd mysql\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\mysql\mysql.pro ) && mingw32-make -f Makefile
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make -f Makefile.Release
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make[2]: Nothing to be done for 'first'.
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'

    C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers>mingw32-make install
    cd mysql\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\mysql\mysql.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlmysql.dll.debug C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlmysql.dll C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake C:\Programming\5.15.0\mingw81_64\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql'
    cd odbc\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlodbc.dll.debug C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlodbc.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlodbc.dll C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlodbc.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Programming\5.15.0\mingw81_64\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/odbc'
    cd sqlite\ && ( if not exist Makefile C:\Programming\5.15.0\mingw81_64\bin\qmake.exe -o Makefile C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro ) && mingw32-make -f Makefile install
    mingw32-make[1]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    mingw32-make -f Makefile.Release install
    mingw32-make[2]: Entering directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    C:\Programming\5.15.0\mingw81_32\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\qsqlite.dll.debug C:\Programming\5.15.0\mingw81_32\plugins\sqldrivers\qsqlite.dll.debug
    copy /y ..\plugins\sqldrivers\qsqlite.dll C:\Programming\5.15.0\mingw81_32\plugins\sqldrivers\qsqlite.dll
    1 file(s) copied.
    C:\Programming\5.15.0\mingw81_32\bin\qmake.exe -install qinstall C:\Programming\5.15.0\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Programming\5.15.0\mingw81_32\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
    mingw32-make[2]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'
    mingw32-make[1]: Leaving directory 'C:/Programming/5.15.0/Src/qtbase/src/plugins/sqldrivers/sqlite'



  • Your cmd output is quite messy, it has both 32bit and 64bit qmake output.
    But normally if you want to use mysql plugin, you'll need to:

    1. copy libmysql.dll to the Qt bin folder or with your exe.
    2. Have msvc & openssl runtimes installed in your pc. Or use libmysql.dll from some older versions of mysql (referring to my signature).
    3. set QT_DEBUG_PLUGINS environment variable to non-zero to get diagnostic information from the output when running your app.


  • @Bonnie I can see libmysql.dll in the Qt MinGW bin folder.

    I think msvc is installed... I've installed Visual Studio 2019 and it appears as one of the kits in Qt. However, it has a yellow flag beside it because I don't have a compiler specified for it. Don't know about openssl though - I don't think I've installed that previously.

    I set QT_DEBUG_PLUGINS environment to 1 and got some interesting output:
    QFactoryLoader::QFactoryLoader() checking directory path "my_path_to_build_folder/build-Accounting-Desktop_Qt_5_15_0_MinGW_64_bit-Debug/debug/sqldrivers" ...
    Cannot load library C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll: The specified module could not be found.
    QLibraryPrivate::loadPlugin failed on "C:/Programming/5.15.0/mingw81_64/plugins/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\Programming\5.15.0\mingw81_64\plugins\sqldrivers\qsqlmysql.dll: The specified module could not be found."

    Odd thing is I can see qsqlmysql.dll in the mingw81_64/plugins/sqldrivers folder, so I don't know why it can't find it!



  • @chihwah
    It probably means the modules it depends on could not be found. :)
    Actually it needs vs2015 runtimes, I'm not sure if it would be installed with vs2019.
    You don't need to install the whole visual studio, the redistributable package would be enough.
    The doc provides a link of vcredist.exe, you can install that. Remember to choose the x64 version.
    For openssl ones, if you don't have v1.1+ installed to PATH, you can copy libssl-1_1-x64.dll and libcrypto-1_1-x64.dll from MySQL bin folder to let them be with libmysql.dll.
    The dependencies can be really annoying, so I prefer to use older versions of mysql without those dependencies.



  • @Bonnie Success! It was the OpenSSL I was missing I think. Once I copied it over it worked like a charm. :) Thanks heaps for putting up with my ineptitude on this topic!

    Where can I learn more about how all of this stuff works? I expect I will need to dabble more in this in the future.



  • @chihwah
    Well, I just learned from googling and practicing. I used to have a lot of third-party libraries building work...


Log in to reply