Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Can't load QMySQL Drivers. Error building mysql plugin.

Can't load QMySQL Drivers. Error building mysql plugin.

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 512 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ranin
    wrote on last edited by
    #1

    Hello,

    I know this has been posted here a lot, but I've tried checking other posts and the official documentation and nothing has helped.

    cmd.PNG

    Heres the config.log:

    Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Server 8.0/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Server 8.0/lib"
    Global lib dirs: [C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib] []
    Global inc dirs: [C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\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:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Qt\5.15.1\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 Server 8.0/lib" -llibmariadb" "QMAKE_INCDIR_MYSQL = "C:/Program Files/MySQL/MySQL Server 8.0/include"" C:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
    • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    del main.obj
    Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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 Server 8.0\include" -IC:\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9AC6.tmp
    main.cpp
    .\main.cpp(3): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
    Stop.
    => source failed verification.
    Trying source 6 (type inline) of library mysql ...

    • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Qt\5.15.1\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 Server 8.0/lib" -llibmysql" "QMAKE_INCDIR_MYSQL = "C:/Program Files/MySQL/MySQL Server 8.0/include"" C:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
    • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    del main.obj
    Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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 Server 8.0\include" -IC:\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9C2D.tmp
    main.cpp
    .\main.cpp(3): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
    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 ...
    sql.h not found in [] and global paths.
    sqlext.h not found in [] and global paths.
    => source produced no result.
    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:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && C:\Qt\5.15.1\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:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
    • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    del main.obj
    Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds\main.obj
    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9DB4.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.27.29110\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

    I am using 64bit mysql 8.0.21 and msvc2019_64 for qmake and qt version 5.15.1 on windows 10.

    Christian EhrlicherC 1 Reply Last reply
    0
    • R Ranin

      Hello,

      I know this has been posted here a lot, but I've tried checking other posts and the official documentation and nothing has helped.

      cmd.PNG

      Heres the config.log:

      Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Server 8.0/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Server 8.0/lib"
      Global lib dirs: [C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib] []
      Global inc dirs: [C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\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:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Qt\5.15.1\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 Server 8.0/lib" -llibmariadb" "QMAKE_INCDIR_MYSQL = "C:/Program Files/MySQL/MySQL Server 8.0/include"" C:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
      • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      del main.obj
      Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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 Server 8.0\include" -IC:\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9AC6.tmp
      main.cpp
      .\main.cpp(3): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
      Stop.
      => source failed verification.
      Trying source 6 (type inline) of library mysql ...

      • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && C:\Qt\5.15.1\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 Server 8.0/lib" -llibmysql" "QMAKE_INCDIR_MYSQL = "C:/Program Files/MySQL/MySQL Server 8.0/include"" C:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
      • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      del main.obj
      Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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 Server 8.0\include" -IC:\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9C2D.tmp
      main.cpp
      .\main.cpp(3): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
      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 ...
      sql.h not found in [] and global paths.
      sqlext.h not found in [] and global paths.
      => source produced no result.
      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:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && C:\Qt\5.15.1\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:/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
      • cd /d C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake

      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      del main.obj
      Could Not Find C:\Qt\5.15.1\Src\qtbase\src\plugins\sqldrivers\config.tests\tds\main.obj
      Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
      Copyright (C) Microsoft Corporation. All rights reserved.
      cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -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.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\airru\AppData\Local\Temp\nm9DB4.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.27.29110\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

      I am using 64bit mysql 8.0.21 and msvc2019_64 for qmake and qt version 5.15.1 on windows 10.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Ranin said in Can't load QMySQL Drivers. Error building mysql plugin.:

      fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

      Your compiler setup is not complete. Make sure to run the whole stuff from the correct visual studio command prompt - Qt can't do anything against this.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      R 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @Ranin said in Can't load QMySQL Drivers. Error building mysql plugin.:

        fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

        Your compiler setup is not complete. Make sure to run the whole stuff from the correct visual studio command prompt - Qt can't do anything against this.

        R Offline
        R Offline
        Ranin
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in Can't load QMySQL Drivers. Error building mysql plugin.:

        Your compiler setup is not complete. Make sure to run the whole stuff from the correct visual studio command prompt - Qt can't do anything against this.

        Can you clarify? My Qt project seems to build and run with msvc2019 compiler. What other setup do I have to do? I think I installed it with vs installer.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          As you can see windows.h is not found. This means your compiler setup inside cmd.exe is not complete. You likely forgot to use the Visual Studio Command prompt so some paths for the compiler are not correct.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • R Offline
            R Offline
            Ranin
            wrote on last edited by
            #5

            Okay It seems I finally got it to work. I ran "vcvarsall.bat x64 windows_sdk_version" and that fixed it. Not sure if it was using older sdk or wrong architecture. Thanks for steering me in the right direction.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved