Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MySQL plugin creating issue
Forum Updated to NodeBB v4.3 + New Features

MySQL plugin creating issue

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 912 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.
  • KutyusK Offline
    KutyusK Offline
    Kutyus
    wrote on last edited by
    #1

    While compiling the Mariadb plugin, the following error message is generated in the log:

    Trying source 6 (type inline) of library mysql ...
    + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && c:\Qt\5.15.2\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/MariaDB/MariaDB Connector C 64-bit/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"c:/Program Files/MariaDB/MariaDB Connector C 64-bit/include\"" C:/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
    + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.28.29336.0
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	del main.obj
    > Could Not Find C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
    > Microsoft (R) Program Maintenance Utility Version 14.28.29336.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\MariaDB\MariaDB Connector C 64-bit\include" -IC:\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\Kutyus\AppData\Local\Temp\nm4023.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.28.29333\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
    > Stop.
    

    Same bug as on this topic: https://forum.qt.io/topic/109418/qmake-can-t-find-mysql/2, I tried the things there but it didn't help, any other suggestions maybe?
    Windows 10, MSVC 2019 I use a 64-bit compiler.

    Thank you: Kutyus

    KroMignonK 1 Reply Last reply
    0
    • KutyusK Kutyus

      While compiling the Mariadb plugin, the following error message is generated in the log:

      Trying source 6 (type inline) of library mysql ...
      + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && c:\Qt\5.15.2\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/MariaDB/MariaDB Connector C 64-bit/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"c:/Program Files/MariaDB/MariaDB Connector C 64-bit/include\"" C:/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
      + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
      > Microsoft (R) Program Maintenance Utility Version 14.28.29336.0
      > Copyright (C) Microsoft Corporation.  All rights reserved.
      > 	del main.obj
      > Could Not Find C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
      > Microsoft (R) Program Maintenance Utility Version 14.28.29336.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\MariaDB\MariaDB Connector C 64-bit\include" -IC:\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\Kutyus\AppData\Local\Temp\nm4023.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.28.29333\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
      > Stop.
      

      Same bug as on this topic: https://forum.qt.io/topic/109418/qmake-can-t-find-mysql/2, I tried the things there but it didn't help, any other suggestions maybe?
      Windows 10, MSVC 2019 I use a 64-bit compiler.

      Thank you: Kutyus

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #3

      @Kutyus It look like you want to compile Qt 5.15.2 with MSVC2019 in 64 bit. Right?

      • You have to download MySQL Connector/C 6.1.5 from MySQL web site (beware, C not C++ and 6.1.5 not newer!!)
      • Setup build environnement by starting Qt console. Here an exemple with Qt 5.12.10 (I don't have Qt 5.15.2 installed ;) )
        8e867466-b40d-4d6c-bd13-a8b3b567858e-image.png
      • In the DOS-console setup MSVC path with
      "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
      
      • Goto plugin sources, configure, build and install
      cd  C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers
      qmake -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
      nmake
      nmake install
      

      That's it ;)

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

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

        You MSVC environment is not properly set up. I would guess you can't compile a simple main.cpp which includes windows.h header file too. Make sure to call the correct visual studio command prompt and that then the env is properly set up - nothing Qt can do 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

        1 Reply Last reply
        1
        • KutyusK Kutyus

          While compiling the Mariadb plugin, the following error message is generated in the log:

          Trying source 6 (type inline) of library mysql ...
          + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && c:\Qt\5.15.2\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/MariaDB/MariaDB Connector C 64-bit/lib\" -llibmysql" "QMAKE_INCDIR_MYSQL = \"c:/Program Files/MariaDB/MariaDB Connector C 64-bit/include\"" C:/Qt/5.15.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
          + cd /d C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql && set MAKEFLAGS=& nmake clean && set MAKEFLAGS=& nmake
          > Microsoft (R) Program Maintenance Utility Version 14.28.29336.0
          > Copyright (C) Microsoft Corporation.  All rights reserved.
          > 	del main.obj
          > Could Not Find C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers\config.tests\mysql\main.obj
          > Microsoft (R) Program Maintenance Utility Version 14.28.29336.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\MariaDB\MariaDB Connector C 64-bit\include" -IC:\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\Kutyus\AppData\Local\Temp\nm4023.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.28.29333\bin\Hostx64\x64\cl.EXE"' : return code '0x2'
          > Stop.
          

          Same bug as on this topic: https://forum.qt.io/topic/109418/qmake-can-t-find-mysql/2, I tried the things there but it didn't help, any other suggestions maybe?
          Windows 10, MSVC 2019 I use a 64-bit compiler.

          Thank you: Kutyus

          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by
          #3

          @Kutyus It look like you want to compile Qt 5.15.2 with MSVC2019 in 64 bit. Right?

          • You have to download MySQL Connector/C 6.1.5 from MySQL web site (beware, C not C++ and 6.1.5 not newer!!)
          • Setup build environnement by starting Qt console. Here an exemple with Qt 5.12.10 (I don't have Qt 5.15.2 installed ;) )
            8e867466-b40d-4d6c-bd13-a8b3b567858e-image.png
          • In the DOS-console setup MSVC path with
          "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
          
          • Goto plugin sources, configure, build and install
          cd  C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers
          qmake -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
          nmake
          nmake install
          

          That's it ;)

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          KutyusK 1 Reply Last reply
          1
          • KroMignonK KroMignon

            @Kutyus It look like you want to compile Qt 5.15.2 with MSVC2019 in 64 bit. Right?

            • You have to download MySQL Connector/C 6.1.5 from MySQL web site (beware, C not C++ and 6.1.5 not newer!!)
            • Setup build environnement by starting Qt console. Here an exemple with Qt 5.12.10 (I don't have Qt 5.15.2 installed ;) )
              8e867466-b40d-4d6c-bd13-a8b3b567858e-image.png
            • In the DOS-console setup MSVC path with
            "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
            
            • Goto plugin sources, configure, build and install
            cd  C:\Qt\5.15.2\Src\qtbase\src\plugins\sqldrivers
            qmake -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
            nmake
            nmake install
            

            That's it ;)

            KutyusK Offline
            KutyusK Offline
            Kutyus
            wrote on last edited by
            #4

            @KroMignon I have the solution, I called the vcvarsall.bat command with a bad parameter, it worked based on that, thanks.

            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