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. MySql (8.0.26), Windows 10, Qt 5.14.1, msvc2017_64
Forum Updated to NodeBB v4.3 + New Features

MySql (8.0.26), Windows 10, Qt 5.14.1, msvc2017_64

Scheduled Pinned Locked Moved Solved Installation and Deployment
driver not loadmysqlqt 5.14.1
6 Posts 2 Posters 870 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.
  • T Offline
    T Offline
    thatguyJoe
    wrote on last edited by thatguyJoe
    #1

    I have been walking through many different forums the past few days trying to figure out how to build the MySql Driver and I have reached a point where my qmake manages to get MySql to output yes as below but have struggled to get much further.
    Qt Sql Drivers:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. yes

    but when running the following command within x64 native tools command prompt for VS 2019
    Nmake sub-mysql /D

    it gives me this error (this is a snippet but I think this is the important part. Please let me know is this is incorrect)

    Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qvarlengtharray.h
    Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qcontainerfwd.h
    Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qobject_impl.h
    Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qt_windows.h
    Mon, Jul 26 2021 15:34:09 .moc\debug\moc_predefs.h
    Thu, Jan 23 2020 04:58:56 C:\Qt\5.14.1\msvc2017_64\bin\moc.exe
    Mon, Jul 26 2021 15:34:11 .moc\debug\moc_qsql_mysql_p.cpp
    Mon, Jul 26 2021 16:30:38 .obj\debug\moc_qsql_mysql_p.obj
    Fri, Jul 23 2021 14:13:12 qsqlmysqld_resource.rc
    Mon, Jul 26 2021 15:34:11 .obj\debug\qsqlmysqld_resource.res
    ..\plugins\sqldrivers\qsqlmysqld.dll target does not exist

    I guess my first question would be is qsqlmysqld.dll supposed to be generated by qmake or is this supposed to be within either my MySql installation or my Qt installation? Any suggestions?

    also my qmake looks like the following in case that is important
    qmake -- MYSQL_INCDIR="C:\Program Files\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\Program Files\MySQL\MySQLServer8.0\lib"

    Thanks!

    T 1 Reply Last reply
    0
    • T thatguyJoe

      I have been walking through many different forums the past few days trying to figure out how to build the MySql Driver and I have reached a point where my qmake manages to get MySql to output yes as below but have struggled to get much further.
      Qt Sql Drivers:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. yes

      but when running the following command within x64 native tools command prompt for VS 2019
      Nmake sub-mysql /D

      it gives me this error (this is a snippet but I think this is the important part. Please let me know is this is incorrect)

      Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qvarlengtharray.h
      Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qcontainerfwd.h
      Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qobject_impl.h
      Thu, Jan 23 2020 04:26:20 C:\Qt\5.14.1\msvc2017_64\include\QtCore\qt_windows.h
      Mon, Jul 26 2021 15:34:09 .moc\debug\moc_predefs.h
      Thu, Jan 23 2020 04:58:56 C:\Qt\5.14.1\msvc2017_64\bin\moc.exe
      Mon, Jul 26 2021 15:34:11 .moc\debug\moc_qsql_mysql_p.cpp
      Mon, Jul 26 2021 16:30:38 .obj\debug\moc_qsql_mysql_p.obj
      Fri, Jul 23 2021 14:13:12 qsqlmysqld_resource.rc
      Mon, Jul 26 2021 15:34:11 .obj\debug\qsqlmysqld_resource.res
      ..\plugins\sqldrivers\qsqlmysqld.dll target does not exist

      I guess my first question would be is qsqlmysqld.dll supposed to be generated by qmake or is this supposed to be within either my MySql installation or my Qt installation? Any suggestions?

      also my qmake looks like the following in case that is important
      qmake -- MYSQL_INCDIR="C:\Program Files\MySQL\MySQLServer8.0\include" MYSQL_LIBDIR="C:\Program Files\MySQL\MySQLServer8.0\lib"

      Thanks!

      T Offline
      T Offline
      thatguyJoe
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Since you did several attempts did you clean before doing that build ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • T Offline
          T Offline
          thatguyJoe
          wrote on last edited by thatguyJoe
          #4

          Update: tried clean, also deleted config.cache, then reran Qmake

          just putting this to make sure I am on the same page for what is considered a clean build. I ran nmake clean in the directory I was running the qmake. I also deleted the config.cache file. This being said looking at the error I am receiving I believe it is possible this may not have been what you meant. I say this because of the inclusion of -IC:\Program -IFiles\MySQL\ConnectorC++8.0\include which I am no longer using.

          After attempting to clean I managed to get a " 'mysql.h': No such file or directory " error that looks like the following.
          (once again this is a snippet of the error that I believe to be most relevant so let me know if you need it all)

          cl -BxC:\Qt\5.14.1\msvc2017_64\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -std:c++17 -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\5.14.1\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >.moc\debug\moc_predefs.h

                      C:\Qt\5.14.1\msvc2017_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_QML_DEBUG -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include C:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql/.moc/debug/moc_predefs.h -IC:/Qt/5.14.1/msvc2017_64/mkspecs/win32-msvc -IC:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql -IC:/Program -IC:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql/Files/MySQL/ConnectorC++8.0/include -IC:/Qt/5.14.1/msvc2017_64/include/QtSql/5.14.1 -IC:/Qt/5.14.1/msvc2017_64/include/QtSql/5.14.1/QtSql -IC:/Qt/5.14.1/msvc2017_64/include/QtCore/5.14.1 -IC:/Qt/5.14.1/msvc2017_64/include/QtCore/5.14.1/QtCore -IC:/Qt/5.14.1/msvc2017_64/include -IC:/Qt/5.14.1/msvc2017_64/include/QtSql -IC:/Qt/5.14.1/msvc2017_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" main.cpp -o .moc\debug\main.moc
              
                      C:\Qt\5.14.1\msvc2017_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_QML_DEBUG -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL --compiler-flavor=msvc --include C:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql/.moc/debug/moc_predefs.h -IC:/Qt/5.14.1/msvc2017_64/mkspecs/win32-msvc -IC:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql -IC:/Program -IC:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/mysql/Files/MySQL/ConnectorC++8.0/include -IC:/Qt/5.14.1/msvc2017_64/include/QtSql/5.14.1 -IC:/Qt/5.14.1/msvc2017_64/include/QtSql/5.14.1/QtSql -IC:/Qt/5.14.1/msvc2017_64/include/QtCore/5.14.1 -IC:/Qt/5.14.1/msvc2017_64/include/QtCore/5.14.1/QtCore -IC:/Qt/5.14.1/msvc2017_64/include -IC:/Qt/5.14.1/msvc2017_64/include/QtSql -IC:/Qt/5.14.1/msvc2017_64/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" 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_QML_DEBUG -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 -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -std:c++17 -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_QML_DEBUG -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_WINDLL -I. -IC:\Program -IFiles\MySQL\ConnectorC++8.0\include -IC:\Qt\5.14.1\msvc2017_64\include\QtSql\5.14.1 -IC:\Qt\5.14.1\msvc2017_64\include\QtSql\5.14.1\QtSql -IC:\Qt\5.14.1\msvc2017_64\include\QtCore\5.14.1 -IC:\Qt\5.14.1\msvc2017_64\include\QtCore\5.14.1\QtCore -IC:\Qt\5.14.1\msvc2017_64\include -IC:\Qt\5.14.1\msvc2017_64\include\QtSql -IC:\Qt\5.14.1\msvc2017_64\include\QtCore -I.moc\debug -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\5.14.1\msvc2017_64\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\JFLYNT~1\AppData\Local\Temp\nm6917.tmp
             qsql_mysql.cpp
              
              C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers\mysql\qsql_mysql_p.h(60): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
              main.cpp
              C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers\mysql\qsql_mysql_p.h(60): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
          

          Any ideas?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            thatguyJoe
            wrote on last edited by
            #5

            I also just noticed that the C:\Program Files\MySQL\MySQLServer8.0 isn't showing up on any of the directories on this error right now. looking to fix that now in case that is the issue.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              thatguyJoe
              wrote on last edited by
              #6

              ended up having to walk through dependency walker to solve as some necessary dll files were not where they needed to be.

              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