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

QT5.15.0, MySQL database, msvc2015_64 and Windows 10



  • Hi to all,

    I spent the last three days to solve my Mysql connection problem, but I'm still stuck!
    I've read several topics about the:

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
    

    and I tried to follow the instructions reported in them with no success.

    I tried to copy the DLLs to C:\Qt\5.15.0\msvc2015_64\bin folder, but nothing changed, the error is still there.
    I can't understand if there is a problem with my Qt installation or if I have a problem with the MySQL server.

    I'm using Xampp and I installed the MySQL connector, this is how my folder looks like:

    Directory of C:\Program Files\MySQL
    
    26/07/2020  21:09    <DIR>          .
    26/07/2020  21:09    <DIR>          ..
    26/07/2020  20:26    <DIR>          Connector C++ 8.0
    26/07/2020  21:09    <DIR>          Connector ODBC 8.0
    04/07/2020  20:01    <DIR>          MySQL Connector C 6.1
    26/07/2020  21:09    <DIR>          MySQL Router 8.0
    26/07/2020  21:08    <DIR>          MySQL Shell 8.0
    26/07/2020  21:04    <DIR>          MySQL Workbench 8.0 CE
                  0 File(s)              0 bytes
                  8 Dir(s)  167,933,632,512 bytes free
    

    I also noticed that qmake only works if I run it from: ```
    C:\Qt\5.15.0\msvc2015_64\bin

    is it normal?
    
    I download the qt-everywhere-src-5.15.0 package and I tried to build the mysql.pro project but I get this error:
    
    

    :-1: error: Library 'mysql' is not defined.

    and this is my mysql.pro file:
    
    

    TARGET = qsqlmysql

    HEADERS += $$PWD/qsql_mysql_p.h
    SOURCES += $$PWD/qsql_mysql.cpp $$PWD/main.cpp

    QMAKE_USE += mysql

    OTHER_FILES += mysql.json

    PLUGIN_CLASS_NAME = QMYSQLDriverPlugin
    include(../qsqldriverbase.pri)

    
    I usually don't use Windows, so may be I'm just doing a stupid error, but I can't really figure it out by myself.
    Please, can you help me?
    
    Thank you!


  • @Marcus-Barnet said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    and I can select Visual C++ compiler16.6.30320.27 (amd64)
    Should I switch to this other one?

    Yes, change both C and C++ to 16.6.30320.27 (amd64)


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What instructions are you following ?



    1. Open "VS2015 x64 Native Tools Command Prompt" from your vs2015 start menu folder
    2. C:\Qt\5.15.0\msvc2015_64\bin\qtenv2.bat
    3. cd path\to\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers

    Then follow this instruction:
    https://doc.qt.io/qt-5/sql-driver.html#how-to-build-the-qmysql-plugin-on-windows

    And...don't use ``` as line break, it is the code tag of this forum...



  • @SGaist said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    Hi and welcome to devnet,

    What instructions are you following ?

    Unfortunately, I tried to follow lots of instructions found on the net during the last days, but no one worked for me.



  • @Bonnie said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    1. Open "VS2015 x64 Native Tools Command Prompt" from your vs2015 start menu folder
    2. C:\Qt\5.15.0\msvc2015_64\bin\qtenv2.bat
    3. cd path\to\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers

    Then follow this instruction:
    https://doc.qt.io/qt-5/sql-driver.html#how-to-build-the-qmysql-plugin-on-windows

    And...don't use ``` as line break, it is the code tag of this forum...

    Thank you for your advice and support!

    So, I did in this way:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>C:\Qt\5.15.0\msvc2015_64\bin\qtenv2.bat
    Setting up environment for Qt usage...
    Remember to call vcvarsall.bat to complete environment setup!
    
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>vcvarsall.bat
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/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 'nmake'.
    Once everything is built, you must run 'nmake install'.
    Qt will be installed into 'C:\Qt\5.15.0\msvc2015_64'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>nmake
    
    Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cd odbc\ && ( if not exist Makefile C:\Qt\5.15.0\msvc2015_64\bin\qmake.exe -o Makefile "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\odbc\odbc.pro" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
    
    Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release all
    
    Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cl -BxC:\Qt\5.15.0\msvc2015_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\5.15.0\msvc2015_64\mkspecs\features\data\dummy.cpp 2>NUL >.moc\release\moc_predefs.h
            C:\Qt\5.15.0\msvc2015_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/odbc/.moc/release/moc_predefs.h" -IC:/Qt/5.15.0/msvc2015_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/odbc" -IC:/Qt/5.15.0/msvc2015_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2015_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2015_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2015_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2015_64/include -IC:/Qt/5.15.0/msvc2015_64/include/QtSql -IC:/Qt/5.15.0/msvc2015_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" main.cpp -o .moc\release\main.moc
            C:\Qt\5.15.0\msvc2015_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/odbc/.moc/release/moc_predefs.h" -IC:/Qt/5.15.0/msvc2015_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/odbc" -IC:/Qt/5.15.0/msvc2015_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2015_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2015_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2015_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2015_64/include -IC:/Qt/5.15.0/msvc2015_64/include/QtSql -IC:/Qt/5.15.0/msvc2015_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" qsql_odbc_p.h -o .moc\release\moc_qsql_odbc_p.cpp
            rc /NOLOGO -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -fo .obj\release\qsqlodbc_resource.res qsqlodbc_resource.rc
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\release\qsqlodbc.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2015_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2015_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2015_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2015_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2015_64\include -IC:\Qt\5.15.0\msvc2015_64\include\QtSql -IC:\Qt\5.15.0\msvc2015_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:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\39328\AppData\Local\Temp\nm346F.tmp
    qsql_odbc.cpp
    main.cpp
    Generating Code...
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\release\qsqlodbc.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2015_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2015_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2015_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2015_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2015_64\include -IC:\Qt\5.15.0\msvc2015_64\include\QtSql -IC:\Qt\5.15.0\msvc2015_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:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\39328\AppData\Local\Temp\nm4151.tmp
    moc_qsql_odbc_p.cpp
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /OUT:..\plugins\sqldrivers\qsqlodbc.dll @C:\Users\39328\AppData\Local\Temp\nm4692.tmp
    Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x458'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    

    It seems a problem with 32 and 64-bit architecture.
    I'm using msvc2015_64 but I realized that vs2015 x86 native tools is placed in the 32bit folder Program Files (x86).
    On this forum, I found a topic with the same problem, and it was suggested to run vcvarsall.bat amd64, I did it, too, but nothing changed, the problem is still there.

    Should I revert to 32bit?



  • @Marcus-Barnet
    No need. I asked you to open the x64 Native Tools, not x86.
    It doesn't matter that it is placed in the (x86) folder because visual studio will always be installed there.
    And you should not run nmake yet because the MySql configure status of qmake is still no according to the output your posted.

    Checking for MySQL... no
    ...
      MySql .................................. no
    

    You need to fix that first.

    Now that your first try has failed, there is an important note in the instruction you need to notice:

    If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again. If you encounter an error during the qmake stage, open config.log to see what went wrong.

    So every time you try to run qmake again, remember to delete config.cache first.
    Now, be sure that you start from the x64 Native Tools Command Prompt, delete config.cache and run that qmake command again.
    If the Mysql status is still no, post the output and config.log here.
    If it is yes, don't run nmake, but run nmake sub-mysql as in the instruction because you don't need to compile other plugins like odbc.



  • @Bonnie Thank you for your support!

    I deleted the config.cache and I run again the x64 native tools.

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>C:\Qt\5.15.0\msvc2015_64\bin\qtenv2.bat
    Setting up environment for Qt usage...
    Remember to call vcvarsall.bat to complete environment setup!
    
    C:\Qt\5.15.0\msvc2015_64>cd C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/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... no
    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 ................................... no
      PostgreSQL ............................. no
      SQLite2 ................................ no
      SQLite ................................. yes
        Using system provided SQLite ......... no
      TDS (Sybase) ........................... no
    
    Qt is now configured for building. Just run 'nmake'.
    Once everything is built, you must run 'nmake install'.
    Qt will be installed into 'C:\Qt\5.15.0\msvc2015_64'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    

    I still get "no" for mysql, so this is the cocntent of the config.log

    Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Connector C 6.1/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Connector C 6.1/lib"
    Global lib dirs: [C:\\openssl\\lib C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib] ["C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\um\\x64"]
    Global inc dirs: [C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include] ["C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\INCLUDE" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\shared" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\winrt"]
    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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && C:\Qt\5.15.0\msvc2015_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = \"-LC:/Program Files/MySQL/MySQL Connector C 6.1/lib\" -llibmariadb" "QMAKE_INCDIR_MYSQL = \"C:/Program Files/MySQL/MySQL Connector C 6.1/include\"" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/mysql"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm8CE4.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:mysql.exe @C:\Users\39328\AppData\Local\Temp\nm8EAA.tmp
    > LINK : fatal error LNK1181: cannot open input file 'libmariadb.lib'
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x49d'
    > Stop.
     => source failed verification.
    Trying source 6 (type inline) of library mysql ...
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && C:\Qt\5.15.0\msvc2015_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = \"-LC:/Program Files/MySQL/MySQL Connector C 6.1/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"C:/Program Files/MySQL/MySQL Connector C 6.1/include\"" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/mysql"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm8FA3.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:mysql.exe @C:\Users\39328\AppData\Local\Temp\nm912B.tmp
    > LINK : fatal error LNK1158: cannot run 'rc.exe'
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x486'
    > Stop.
     => 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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\odbc" && C:\Qt\5.15.0\msvc2015_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += odbc" "QMAKE_LIBS_ODBC = -lodbc32" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/odbc"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\odbc" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm9234.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:odbc.exe @C:\Users\39328\AppData\Local\Temp\nm93AC.tmp
    > LINK : fatal error LNK1158: cannot run 'rc.exe'
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x486'
    > Stop.
     => source failed verification.
    Trying source 1 (type inline) of library odbc ...
      => source failed condition 'config.darwin'.
    Trying source 2 (type inline) of library odbc ...
      => source failed condition '!config.win32 && !config.darwin'.
    test config.sqldrivers.libraries.odbc FAILED
    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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds" && C:\Qt\5.15.0\msvc2015_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += tds" "QMAKE_LIBS_TDS = -lNTWDBLIB" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/tds"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Could Not Find C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds\main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm94B4.tmp
    > main.cpp
    > .\main.cpp(2): fatal error C1083: Cannot open include file: 'sybfront.h': No such file or directory
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
    > Stop.
     => source failed verification.
    Trying source 1 (type sybaseEnv) of library tds ...
      => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.tds FAILED
    

    I don't know if this information is useful, but I'm using XAMPP for the MySQL database and it works fine since I'm able to create db by using phpmyadmin.



  • @Marcus-Barnet
    I'm not familiar with XAMPP but seems it downloads MySQL Connector C 6.1 , I think that should be fine.
    The configure part we are looking for should be "source 6 (type inline) of library mysql", so

    Trying source 6 (type inline) of library mysql ...
    > + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && C:\Qt\5.15.0\msvc2015_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = \"-LC:/Program Files/MySQL/MySQL Connector C 6.1/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"C:/Program Files/MySQL/MySQL Connector C 6.1/include\"" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/mysql"
    > + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > > Copyright (C) Microsoft Corporation.  All rights reserved.
    > > 	del main.obj
    > > Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    > > Copyright (C) Microsoft Corporation.  All rights reserved.
    > > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\Qt\5.15.0\msvc2015_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm8FA3.tmp
    > > main.cpp
    > > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:mysql.exe @C:\Users\39328\AppData\Local\Temp\nm912B.tmp
    > > LINK : fatal error LNK1158: cannot run 'rc.exe'
    > > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x486'
    > > Stop.
    >  => source failed verification.
    

    It seems that it can't find windows sdk (which includes rc.exe). Have you installed that?



  • Just to add to @Bonnie, how to get rc.exe working: you can try running the VS2015 Update 3 setup again and this time add:
    Windows and Web Development -> Universal Windows App Development Tools -> Tools (1.4.1) and Windows 10 SDK



  • I've installaed Windows 10 SDK (10.0.19041.0), but I still get the rc.exe error.

    EDIT: I had the same problem with QtCreator and I solved it by adding C:\Program Files (x86)\Windows Kits\8.1\bin\x64; to PATH variable.



  • Windows 10 SDK (10.0.19041.0) is too modern for MSVC2015 I think :-(

    Either upgrade your MSVC2015 to MSVC2017 or MSVC2019
    or downgrade your Windows 10 SDK to 10.0.17763.0 link here



  • I have this folder C:\Qt\5.15.0\msvc2019_64 and I have Visual Studio 2017 installed on my Windows.

    Do I just need to switch to msvc2019 to solve the problem?
    If so, should I download and install VS2019?



  • Yes, using MSVC2019 will help with the mysql stuff.
    When you install it, select ”native Win32 development in C/C++” so you get the Win 10 SDK installed as well.



  • @Marcus-Barnet said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    I had the same problem with QtCreator and I solved it by adding C:\Program Files (x86)\Windows Kits\8.1\bin\x64; to PATH variable.

    Hmmm...Then I think maybe it can work.
    Usually start from native tools command prompt would add the win sdk bin to PATH, but yours seems having some problems.
    After open from the native tools, run "path" to output your PATH and see if there is win sdk bin in it or anything conflicting.



  • @Bonnie said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    @Marcus-Barnet said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    I had the same problem with QtCreator and I solved it by adding C:\Program Files (x86)\Windows Kits\8.1\bin\x64; to PATH variable.

    Hmmm...Then I think maybe it can work.
    Usually start from native tools command prompt would add the win sdk bin to PATH, but yours seems having some problems.
    After open from the native tools, run "path" to output your PATH and see if there is win sdk bin in it or anything conflicting.

    This is the output of 'path' command when I run it from x64 VS2015 native tools:

    PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\14.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Point Grey Research\FlyCapture2\bin64;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2013;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2015;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sontheim\MT_Api;C:\Program Files (x86)\Sontheim\MT_Api\;C:\Server\PHP;C:\Users\39328\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\39328\AppData\Local\Microsoft\WindowsApps;C:\Users\39328\AppData\Roaming\npm;C:\Users\39328\.dotnet\tools
    


  • May be I'm on the right road, I run x64 VS2019 Native tools and now it finds the MySQL!

    But I get an error when I launch nmake install:

    *******************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.6.5
    ** Copyright (c) 2020 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'
    
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>C:\Qt\5.15.0\msvc2019_64\bin\qtenv2.bat
    Setting up environment for Qt usage...
    Remember to call vcvarsall.bat to complete environment setup!
    
    C:\Qt\5.15.0\msvc2019_64>cd C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/lib"
    
    Running configuration tests...
    Checking for DB2 (IBM)... no
    Checking for InterBase... no
    Checking for MySQL... yes
    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 .................................. yes
      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 'nmake'.
    Once everything is built, you must run 'nmake install'.
    Qt will be installed into 'C:\Qt\5.15.0\msvc2019_64'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>nmake sub-mysql
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cd mysql\ && ( if not exist Makefile C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -o Makefile "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\mysql\mysql.pro" ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile.Release all
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cl -BxC:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\5.15.0\msvc2019_64\mkspecs\features\data\dummy.cpp 2>NUL >.moc\release\moc_predefs.h
            C:\Qt\5.15.0\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql/.moc/release/moc_predefs.h" -IC:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql" -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2019_64/include -IC:/Qt/5.15.0/msvc2019_64/include/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" main.cpp -o .moc\release\main.moc
            C:\Qt\5.15.0\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql/.moc/release/moc_predefs.h" -IC:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql" -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2019_64/include -IC:/Qt/5.15.0/msvc2019_64/include/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" qsql_mysql_p.h -o .moc\release\moc_qsql_mysql_p.cpp
            rc /NOLOGO -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -fo .obj\release\qsqlmysql_resource.res qsqlmysql_resource.rc
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\release\qsqlmysql.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2019_64\include -IC:\Qt\5.15.0\msvc2019_64\include\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore -I.moc\release -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\39328\AppData\Local\Temp\nm8072.tmp
    qsql_mysql.cpp
    main.cpp
    Generating Code...
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -Zi -MD -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\release\qsqlmysql.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2019_64\include -IC:\Qt\5.15.0\msvc2019_64\include\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore -I.moc\release -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\39328\AppData\Local\Temp\nm8AB4.tmp
    moc_qsql_mysql_p.cpp
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /OUT:..\plugins\sqldrivers\qsqlmysql.dll @C:\Users\39328\AppData\Local\Temp\nm8E7E.tmp
       Creating library ..\plugins\sqldrivers\qsqlmysql.lib and object ..\plugins\sqldrivers\qsqlmysql.exp
            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile.Debug all
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cl -BxC:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zi -MDd -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\5.15.0\msvc2019_64\mkspecs\features\data\dummy.cpp 2>NUL >.moc\debug\moc_predefs.h
            C:\Qt\5.15.0\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql/.moc/debug/moc_predefs.h" -IC:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql" -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2019_64/include -IC:/Qt/5.15.0/msvc2019_64/include/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" main.cpp -o .moc\debug\main.moc
            C:\Qt\5.15.0\msvc2019_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql/.moc/debug/moc_predefs.h" -IC:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc -I"C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/mysql" -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtSql/5.15.0/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0 -IC:/Qt/5.15.0/msvc2019_64/include/QtCore/5.15.0/QtCore -IC:/Qt/5.15.0/msvc2019_64/include -IC:/Qt/5.15.0/msvc2019_64/include/QtSql -IC:/Qt/5.15.0/msvc2019_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" qsql_mysql_p.h -o .moc\debug\moc_qsql_mysql_p.cpp
            rc /NOLOGO -D_DEBUG -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -fo .obj\debug\qsqlmysqld_resource.res qsqlmysqld_resource.rc
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zi -MDd -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\debug\qsqlmysqld.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2019_64\include -IC:\Qt\5.15.0\msvc2019_64\include\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore -I.moc\debug -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\39328\AppData\Local\Temp\nm965B.tmp
    qsql_mysql.cpp
    main.cpp
    Generating Code...
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zi -MDd -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\debug\qsqlmysqld.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -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_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtSql\5.15.0\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0 -IC:\Qt\5.15.0\msvc2019_64\include\QtCore\5.15.0\QtCore -IC:\Qt\5.15.0\msvc2019_64\include -IC:\Qt\5.15.0\msvc2019_64\include\QtSql -IC:\Qt\5.15.0\msvc2019_64\include\QtCore -I.moc\debug -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\39328\AppData\Local\Temp\nm9F17.tmp
    moc_qsql_mysql_p.cpp
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /OUT:..\plugins\sqldrivers\qsqlmysqld.dll @C:\Users\39328\AppData\Local\Temp\nmA2E1.tmp
       Creating library ..\plugins\sqldrivers\qsqlmysqld.lib and object ..\plugins\sqldrivers\qsqlmysqld.exp
    
    C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers>nmake install
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cd mysql\ && ( if not exist Makefile C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -o Makefile "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\mysql\mysql.pro" ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile install
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile.Release install
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            copy /y ..\plugins\sqldrivers\qsqlmysql.dll C:\Qt\5.15.0\msvc2019_64\plugins\sqldrivers\qsqlmysql.dll
            1 file(s) copied.
            copy /y ..\plugins\sqldrivers\qsqlmysql.pdb C:\Qt\5.15.0\msvc2019_64\plugins\sqldrivers\qsqlmysql.pdb
            1 file(s) copied.
            C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -install qinstall "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake" C:\Qt\5.15.0\msvc2019_64\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake
            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile.Debug install
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            copy /y ..\plugins\sqldrivers\qsqlmysqld.dll C:\Qt\5.15.0\msvc2019_64\plugins\sqldrivers\qsqlmysqld.dll
            1 file(s) copied.
            copy /y ..\plugins\sqldrivers\qsqlmysqld.pdb C:\Qt\5.15.0\msvc2019_64\plugins\sqldrivers\qsqlmysqld.pdb
            1 file(s) copied.
            C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -install qinstall "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake" C:\Qt\5.15.0\msvc2019_64\lib\cmake\Qt5Sql\Qt5Sql_QMYSQLDriverPlugin.cmake
            cd odbc\ && ( if not exist Makefile C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -o Makefile "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\odbc\odbc.pro" ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile install
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe" -f Makefile.Release install
    
    Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /OUT:..\plugins\sqldrivers\qsqlodbc.dll @C:\Users\39328\AppData\Local\Temp\nmC7EB.tmp
    Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.EXE"' : return code '0x458'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    

    This is the output of the log file:

    Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Connector C 6.1/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Connector C 6.1/lib"
    Global lib dirs: [C:\\openssl\\lib C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib] ["C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\LIB\\amd64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64" "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\um\\x64"]
    Global inc dirs: [C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include] ["C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\ATLMFC\\INCLUDE" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\shared" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\um" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\winrt"]
    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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && C:\Qt\5.15.0\msvc2019_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = \"-LC:/Program Files/MySQL/MySQL Connector C 6.1/lib\" -llibmariadb" "QMAKE_INCDIR_MYSQL = \"C:/Program Files/MySQL/MySQL Connector C 6.1/include\"" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/mysql"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm1D24.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:mysql.exe @C:\Users\39328\AppData\Local\Temp\nm2023.tmp
    > LINK : fatal error LNK1181: cannot open input file 'libmariadb.lib'
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.EXE"' : return code '0x49d'
    > Stop.
     => source failed verification.
    Trying source 6 (type inline) of library mysql ...
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && C:\Qt\5.15.0\msvc2019_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = \"-LC:/Program Files/MySQL/MySQL Connector C 6.1/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"C:/Program Files/MySQL/MySQL Connector C 6.1/include\"" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/mysql"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\mysql" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -I"C:\Program Files\MySQL\MySQL Connector C 6.1\include" -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm213B.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:mysql.exe @C:\Users\39328\AppData\Local\Temp\nm22E2.tmp
     => source accepted.
    test config.sqldrivers.libraries.mysql succeeded
    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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\odbc" && C:\Qt\5.15.0\msvc2019_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += odbc" "QMAKE_LIBS_ODBC = -lodbc32" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/odbc"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\odbc" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm2458.tmp
    > main.cpp
    > 	link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:odbc.exe @C:\Users\39328\AppData\Local\Temp\nm25EF.tmp
     => 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:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds" && C:\Qt\5.15.0\msvc2019_64\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-winx64\\lib C:\\Utils\\postgresql\\pgsql\\lib" "INCLUDEPATH += C:\\openssl\\include C:\\Utils\\my_sql\\mysql-5.7.25-winx64\\include C:\\Utils\\postgresql\\pgsql\\include" "QMAKE_USE += tds" "QMAKE_LIBS_TDS = -lNTWDBLIB" "C:/Users/39328/Downloads/qt-everywhere-src-5.15.0 (1)/qt-everywhere-src-5.15.0/qtbase/src/plugins/sqldrivers/config.tests/tds"
    + cd /d "C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds" && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Could Not Find C:\Users\39328\Downloads\qt-everywhere-src-5.15.0 (1)\qt-everywhere-src-5.15.0\qtbase\src\plugins\sqldrivers\config.tests\tds\main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\39328\AppData\Local\Temp\nm2736.tmp
    > main.cpp
    > .\main.cpp(2): fatal error C1083: Cannot open include file: 'sybfront.h': No such file or directory
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.EXE"' : return code '0x2'
    > Stop.
     => source failed verification.
    Trying source 1 (type sybaseEnv) of library tds ...
      => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.tds FAILED
    

    P.S. do I need to run vcvarsall.bat after qtenv2.bat?



  • P.S. do I need to run vcvarsall.bat after qtenv2.bat?

    No, Native tools command prompt have called vcvarsall.bat so you don't need to run it again.

    C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;

    This seems not right.
    There should not be x64 and x86 bin in the PATH at the same time.
    And your PATH value seems quite messed up...I'm not sure where do they come from...
    What is the path output from a normal command prompt?
    You may need to do some cleanup and delete some values...



  • output from normal command prompt:

    C:\Program Files\VCG\MeshLab>path
    PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Point Grey Research\FlyCapture2\bin64;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2013;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2015;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sontheim\MT_Api;C:\Program Files (x86)\Sontheim\MT_Api\;C:\Server\PHP;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\39328\AppData\Local\Microsoft\WindowsApps;C:\Users\39328\AppData\Roaming\npm;C:\Users\39328\.dotnet\tools
    

    output from x64 VS2019 native tools:

    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.6.5
    ** Copyright (c) 2020 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'
    
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>path
    PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\\MSBuild\Current\Bin;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Point Grey Research\FlyCapture2\bin64;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2013;C:\Program Files\Point Grey Research\FlyCapture2\bin64\vs2015;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sontheim\MT_Api;C:\Program Files (x86)\Sontheim\MT_Api\;C:\Server\PHP;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\39328\AppData\Local\Microsoft\WindowsApps;C:\Users\39328\AppData\Roaming\npm;C:\Users\39328\.dotnet\tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
    


  • @Marcus-Barnet
    Ok, there is not x86 and x64 bin in the normal PATH, I'm a little confused...
    But I've checked your vs2019 output.
    It seems the mysql plugins have already been copied to the plugin folder.
    So you should have done the job.
    Check C:\Qt\5.15.0\msvc2019_64\plugins\sqldrivers, do you have qsqlmysql.dll and qsqlmysqld.dll there?
    If yes, just copy libmysql.dll from "MySQL Connector C 6.1\lib" (or bin, I'm not sure) to "C:\Qt\5.15.0\msvc2019_64\bin", then it is finished.

    Ah, if you still want to try the vs2015_64 one.
    I think maybe you could run "set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x64;%PATH%" after qtenv2.bat.



  • Finally, it works! Thank you!
    I just followed your advice and I copied the libmysql.dll to "C:\Qt\5.15.0\msvc2019_64\bin" after checked the presence of qsqlmysql.dll and qsqlmysqld.dll in sqldrivers.

    I tried to compile my project in QtCreator and it worked with mscv2019_64 so I think it's OK for me to use this one instead of the 2015 version.

    The project compiles and it is able to connect to MySQL, I only get a warning from the Qtcreator console:

    :-1: warning: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" is used by qmake, but "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe" is configured in the kit.
    Please update your kit (Desktop Qt 5.15.0 MSVC2019 64bit) or choose a mkspec for qmake that matches your target environment better.
    


  • @Marcus-Barnet
    That's a little weird, that path seems to be vs2015 compiler.
    Check the Kits setting of QtCreator, make sure you select the right C/C++ compiler.
    For vs2019_64 that should be 16.x.xxxxx.xx (amd64)



  • This is my current configuration:

    alt text

    and I can select Visual C++ compiler16.6.30320.27 (amd64)

    Should I switch to this other one?



  • @Marcus-Barnet said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    and I can select Visual C++ compiler16.6.30320.27 (amd64)
    Should I switch to this other one?

    Yes, change both C and C++ to 16.6.30320.27 (amd64)



  • I switched it, it compiled the first time my project and everything was OK.

    I tried to compile it again and it gives me this error:

    :-1: error: LNK1104: cannot open file 'release\PUMP.exe'
    

    where PUMP.exe is my project executable.

    I never had this problem before.

    I also get this other warning:

    yvals_core.h:462:2: error: STL1000: Unexpected compiler version, expected Clang 9.0.0 or newer.
    pump.h:1:1: note: in file included from C:\Qt\Examples\Qt-5.15.0\PUMP\pump.h:1:
    pump.h:4:10: note: in file included from C:\Qt\Examples\Qt-5.15.0\PUMP\pump.h:4:
    QMainWindow:1:10: note: in file included from C:\Qt\5.15.0\msvc2019_64\include\QtWidgets\QMainWindow:1:
    qmainwindow.h:43:10: note: in file included from C:\Qt\5.15.0\msvc2019_64\include\QtWidgets\qmainwindow.h:43:
    qtwidgetsglobal.h:43:10: note: in file included from C:\Qt\5.15.0\msvc2019_64\include\QtWidgets\qtwidgetsglobal.h:43:
    qtguiglobal.h:43:10: note: in file included from C:\Qt\5.15.0\msvc2019_64\include\QtGui\qtguiglobal.h:43:
    qglobal.h:45:12: note: in file included from C:\Qt\5.15.0\msvc2019_64\include\QtCore\qglobal.h:45:
    type_traits:9:10: note: in file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:9:
    

    pump.h is very simple:

    #ifndef PUMP_H
    #define PUMP_H
    
    #include <QMainWindow>
    #include <QtSql>
    #include <QSqlDatabase>
    
    QT_BEGIN_NAMESPACE
    namespace Ui { class Pump; }
    QT_END_NAMESPACE
    
    class Pump : public QMainWindow
    {
        Q_OBJECT
    
    public:
        Pump(QWidget *parent = nullptr);
        ~Pump();
    
    private slots:
        void on_pushButton_clicked();
    
    private:
        Ui::Pump *ui;
    };
    #endif // PUMP_H
    


  • PUMP.exe is created during the first compilation (I can run it) and then when I click on build again, it disappears and I get that error.



  • Do you use shadow build? Delete your build folder and try again.



  • @Bonnie said in QT5.15.0, MySQL database, msvc2015_64 and Windows 10:

    Do you use shadow build? Delete your build folder and try again.

    Thank you for your support, everything works fine now!

    @hskoglund: thank you to you, too, for your support!


Log in to reply