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. Error QMYSQL Plugin on Windows
Forum Updated to NodeBB v4.3 + New Features

Error QMYSQL Plugin on Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
59 Posts 8 Posters 17.7k 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.
  • jsulmJ jsulm

    @Stelian This error is unrelated to Qt: you have a path with spaces (good example for why you should avoid such paths!). You need to put such paths into "":

    c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:Program Files/MYSQL/MySQL Server 8.0/lib"
    

    "I have no patience" - well, one should have when developing software...

    J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #19

    @jsulm said in Error QMYSQL Plugin on Windows:

    "I have no patience" - well, one should have when developing software...

    maybe it's a typo and it's supposed to be patients, meaning als patients are gone and there's now more time on hand for developing software

    :P


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    1 Reply Last reply
    1
    • jsulmJ jsulm

      @Stelian This error is unrelated to Qt: you have a path with spaces (good example for why you should avoid such paths!). You need to put such paths into "":

      c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:Program Files/MYSQL/MySQL Server 8.0/lib"
      

      "I have no patience" - well, one should have when developing software...

      S Offline
      S Offline
      Stelian
      wrote on last edited by Stelian
      #20

      @jsulm Thank you for reply!
      I,ve run c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:Program Files/MYSQL/MySQL Server 8.0/lib"
      and I get the next message:

      Running configuration tests...
      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 'mingw32-make'.
      Once everything is built, you must run 'mingw32-make install'.
      Qt will be installed into 'C:\Qt\Qt5.12.1\5.12.1\mingw73_64'.
      

      And I,ve run mingw32-make

      'mingw32-make' is not recognized as an internal or external command,
      operable program or batch file.

      Do I have to add the path to make.exe in environment variables ?
      But I don't find de make.exe file.
      What else do I have to do ?

      jsulmJ 1 Reply Last reply
      0
      • S Stelian

        @jsulm Thank you for reply!
        I,ve run c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:Program Files/MYSQL/MySQL Server 8.0/lib"
        and I get the next message:

        Running configuration tests...
        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 'mingw32-make'.
        Once everything is built, you must run 'mingw32-make install'.
        Qt will be installed into 'C:\Qt\Qt5.12.1\5.12.1\mingw73_64'.
        

        And I,ve run mingw32-make

        'mingw32-make' is not recognized as an internal or external command,
        operable program or batch file.

        Do I have to add the path to make.exe in environment variables ?
        But I don't find de make.exe file.
        What else do I have to do ?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #21

        @Stelian Use whole path to mingw-make

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Stelian
          wrote on last edited by
          #22

          I,ve looked foe mingw-make.exe file into C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin
          I don't find it.
          Do I have to follow next steps ?

          uninstall your current MinGW installation
          reinstall MinGW and select the following option in the setup dialog
          a) Custom
          b) Compilers C & C++
          c) MSYS
          extend your PATH environment variable in the System Properties / Environment Variables dialog of windows by adding C:\MinGW\msys\1.0\bin;C:\MinGW\bin; in front of the values that are already there
          restart machine

          jsulmJ 1 Reply Last reply
          0
          • S Stelian

            I,ve looked foe mingw-make.exe file into C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin
            I don't find it.
            Do I have to follow next steps ?

            uninstall your current MinGW installation
            reinstall MinGW and select the following option in the setup dialog
            a) Custom
            b) Compilers C & C++
            c) MSYS
            extend your PATH environment variable in the System Properties / Environment Variables dialog of windows by adding C:\MinGW\msys\1.0\bin;C:\MinGW\bin; in front of the values that are already there
            restart machine

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #23

            @Stelian It should be in c:\Qt\Tools\mingw730_64\bin

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            1
            • jsulmJ jsulm

              @Stelian It should be in c:\Qt\Tools\mingw730_64\bin

              S Offline
              S Offline
              Stelian
              wrote on last edited by Stelian
              #24

              @jsulm I've run the full path to mingw32-make c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>c:\Qt\Qt5.12.1\Tools\mingw730_64\bin\mingw32-make

              cd sqlite\ && ( if not exist Makefile C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro ) && c:/Qt/Qt5.12.1/Tools/mingw730_64/bin/mingw32-make -f Makefile
              mingw32-make[1]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
              c:/Qt/Qt5.12.1/Tools/mingw730_64/bin/mingw32-make -f Makefile.Release all
              mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
              g++ -c -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DNDEBUG -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1\QtCore -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\win32-g++  -o .obj\release\qsql_sqlite.o qsql_sqlite.cpp
              g++: error: CreateProcess: No such file or directory
              mingw32-make[2]: *** [Makefile.Release:377: .obj/release/qsql_sqlite.o] Error 1
              mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
              mingw32-make[1]: *** [Makefile:42: release-all] Error 2
              mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
              mingw32-make: *** [Makefile:43: sub-sqlite-make_first] Error 2
              
              1 Reply Last reply
              0
              • S Offline
                S Offline
                Stelian
                wrote on last edited by Stelian
                #25

                Meanwhile, I added c:\Qt\Qt5.12.1\Tools\mingw730_64\bin\mingw32-make in PATH environment variable in the System Properties and restart the computer and I've run again

                c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:Program Files/MYSQL/MySQL Server 8.0/lib"

                c:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers>c:\Qt\Qt5.12.1\Tools\mingw730_64\bin\mingw32-make

                and I get ...

                cd sqlite\ && ( if not exist Makefile C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro ) && c:/Qt/Qt5.12.1/Tools/mingw730_64/bin/mingw32-make -f Makefile
                mingw32-make[1]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                c:/Qt/Qt5.12.1/Tools/mingw730_64/bin/mingw32-make -f Makefile.Release all
                mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                g++ -c -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DNDEBUG -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1\QtCore -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\win32-g++  -o .obj\release\qsql_sqlite.o qsql_sqlite.cpp
                g++ -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -dM -E -o .moc\release\moc_predefs.h C:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\features\data\dummy.cpp
                C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DNDEBUG -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB --include C:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite/.moc/release/moc_predefs.h -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/mkspecs/win32-g++ -IC:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite -IC:/Qt/Qt5.12.1/Sources/qtbase/src/3rdparty/sqlite -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql/5.12.1 -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql/5.12.1/QtSql -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore/5.12.1 -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore/5.12.1/QtCore -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed -IC:/Qt/Qt5.12.1/Tools/mingw730_64/x86_64-w64-mingw32/include smain.cpp -o .moc\release\smain.moc
                g++ -c -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DNDEBUG -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1\QtCore -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\win32-g++  -o .obj\release\smain.o smain.cpp
                gcc -c -fno-keep-inline-dllexport -O2 -std=gnu11 -fno-exceptions -Wall -W -Wextra -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DNDEBUG -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1\QtCore -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore -I.moc\release -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\win32-g++  -o .obj\release\sqlite3.o C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c: In function 'sqlite3ThreadJoin':
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c:29362:8: warning: variable 'bRc' set but not used [-Wunused-but-set-variable]
                   BOOL bRc;
                        ^~~
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c: In function 'winUnfetch':
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c:44948:45: warning: unused parameter 'iOff' [-Wunused-parameter]
                 static int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){
                                                             ^~~~
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c: In function 'sqlite3_db_status':
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c:20744:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
                       op = SQLITE_DBSTATUS_CACHE_WRITE+1;
                       ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c:20746:5: note: here
                     case SQLITE_DBSTATUS_CACHE_HIT:
                     ^~~~
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c: In function 'sqlite3_str_vappendf':
                C:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite\sqlite3.c:27452:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
                         flag_long = sizeof(char*)==sizeof(i64) ? 2 :
                         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      sizeof(char*)==sizeof(long int) ? 1 : 0;
                ...
                ...
                ...
                C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -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 --include C:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite/.moc/debug/moc_predefs.h -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/mkspecs/win32-g++ -IC:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite -IC:/Qt/Qt5.12.1/Sources/qtbase/src/3rdparty/sqlite -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql/5.12.1 -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql/5.12.1/QtSql -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore/5.12.1 -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore/5.12.1/QtCore -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtSql -IC:/Qt/Qt5.12.1/5.12.1/mingw73_64/include/QtCore -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include -IC:/Qt/Qt5.12.1/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed -IC:/Qt/Qt5.12.1/Tools/mingw730_64/x86_64-w64-mingw32/include qsql_sqlite_p.h -o .moc\debug\moc_qsql_sqlite_p.cpp
                g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -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 -I. -IC:\Qt\Qt5.12.1\Sources\qtbase\src\3rdparty\sqlite -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql\5.12.1\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1 -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore\5.12.1\QtCore -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtSql -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\include\QtCore -I.moc\debug -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.6.11-winx64\include -IC:\Utils\postgresql\pgsql\include -IC:\Qt\Qt5.12.1\5.12.1\mingw73_64\mkspecs\win32-g++  -o .obj\debug\moc_qsql_sqlite_p.o .moc\debug\moc_qsql_sqlite_p.cpp
                windres -i qsqlited_resource.rc -o .obj\debug\qsqlited_resource_res.o --include-dir=. -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -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
                g++ -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\plugins\sqldrivers\libqsqlited.a -o ..\plugins\sqldrivers\qsqlited.dll .obj/debug/qsql_sqlite.o .obj/debug/smain.o .obj/debug/sqlite3.o .obj/debug/moc_qsql_sqlite_p.o  -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.6.11-winx64\lib -LC:\Utils\postgresql\pgsql\lib -LC:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\libQt5Sqld.a C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\libQt5Cored.a .obj\debug\qsqlited_resource_res.o
                mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                
                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Stelian
                  wrote on last edited by
                  #26

                  When I've run a simple program

                  #include <QCoreApplication>
                  #include <QtSql>
                  #include <QSqlDatabase>
                  #include <QtDebug>
                  
                  int main(int argc, char *argv[])
                  {
                      QCoreApplication a(argc, argv);
                  
                      QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
                      db.setHostName("localhost");
                      db.setUserName("root");
                      db.setPassword("DSa81&l12&z26");
                      db.setDatabaseName("Employee_management");
                  
                      if (db.open())
                      {
                          qDebug() << "Database connected successfuly!";
                      }
                      else
                      {
                          qDebug() << "Database is not connected!";
                      }
                  
                      return a.exec();
                  }
                  

                  I receive the message "Database is not connected!", which means there are still some blurring about the QMYSQL driver.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #27

                    Did you call mingw32-make install after the build succeeded ?

                    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
                    1
                    • S Offline
                      S Offline
                      Stelian
                      wrote on last edited by Stelian
                      #28

                      Yes, and I received the next message

                      cd odbc\ && ( if not exist Makefile C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\odbc\odbc.pro ) && mingw32-make -f Makefile install
                      mingw32-make[1]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      mingw32-make -f Makefile.Release install
                      mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      copy /y ..\plugins\sqldrivers\qsqlodbc.dll C:\Qt\Qt5.12.1\5.12.1\mingw73_64\plugins\sqldrivers\qsqlodbc.dll
                              1 file(s) copied.
                      C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -install qinstall C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                      mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      mingw32-make -f Makefile.Debug install
                      mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      copy /y ..\plugins\sqldrivers\qsqlodbcd.dll C:\Qt\Qt5.12.1\5.12.1\mingw73_64\plugins\sqldrivers\qsqlodbcd.dll
                              1 file(s) copied.
                      C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -install qinstall C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                      mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/odbc'
                      cd sqlite\ && ( if not exist Makefile C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro ) && mingw32-make -f Makefile install
                      mingw32-make[1]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      mingw32-make -f Makefile.Release install
                      mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      copy /y ..\plugins\sqldrivers\qsqlite.dll C:\Qt\Qt5.12.1\5.12.1\mingw73_64\plugins\sqldrivers\qsqlite.dll
                              1 file(s) copied.
                      C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -install qinstall C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                      mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      mingw32-make -f Makefile.Debug install
                      mingw32-make[2]: Entering directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      copy /y ..\plugins\sqldrivers\qsqlited.dll C:\Qt\Qt5.12.1\5.12.1\mingw73_64\plugins\sqldrivers\qsqlited.dll
                              1 file(s) copied.
                      C:\Qt\Qt5.12.1\5.12.1\mingw73_64\bin\qmake.exe -install qinstall C:\Qt\Qt5.12.1\Sources\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.12.1\5.12.1\mingw73_64\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                      mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.12.1/Sources/qtbase/src/plugins/sqldrivers/sqlite'
                      

                      Part of this message is in my previous post

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Stelian
                        wrote on last edited by Stelian
                        #29

                        When I run the code

                        QSqlDatabase: QMYSQL driver not loaded
                        QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                        Database is Not Connected!
                        
                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #30

                          In Qt Creator's Run part of the Project panel, did you add the path to the MySQL dlls in the PATH environment variable ?

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

                          S 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            In Qt Creator's Run part of the Project panel, did you add the path to the MySQL dlls in the PATH environment variable ?

                            S Offline
                            S Offline
                            Stelian
                            wrote on last edited by
                            #31

                            @SGaist Let me understand.
                            First of all, do you mean I have to add that path "C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib" or this path "C:\Program Files\MySQL\MySQL Server 8.0\lib"
                            Second of all, where do I have to add ? (see picture1 and picture2) ?0_1551348026672_Picture1.jpg
                            0_1551348044412_Picture2.jpg

                            jsulmJ 1 Reply Last reply
                            0
                            • S Stelian

                              @SGaist Let me understand.
                              First of all, do you mean I have to add that path "C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib" or this path "C:\Program Files\MySQL\MySQL Server 8.0\lib"
                              Second of all, where do I have to add ? (see picture1 and picture2) ?0_1551348026672_Picture1.jpg
                              0_1551348044412_Picture2.jpg

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #32

                              @Stelian As @SGaist wrote: in QtCreator Run settings.
                              I think you need the MySQL connector libs (but you can simply put both).

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              S 1 Reply Last reply
                              1
                              • jsulmJ jsulm

                                @Stelian As @SGaist wrote: in QtCreator Run settings.
                                I think you need the MySQL connector libs (but you can simply put both).

                                S Offline
                                S Offline
                                Stelian
                                wrote on last edited by
                                #33

                                @jsulm Where do I have to add in the first picture or second ?

                                jsulmJ 1 Reply Last reply
                                0
                                • S Stelian

                                  @jsulm Where do I have to add in the first picture or second ?

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #34

                                  @Stelian In the second of course as it is showing exactly what was suggested: Run settings in QtCreator.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  S 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @Stelian In the second of course as it is showing exactly what was suggested: Run settings in QtCreator.

                                    S Offline
                                    S Offline
                                    Stelian
                                    wrote on last edited by Stelian
                                    #35

                                    @jsulm I,ve added both C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib" and this path "C:\Program Files\MySQL\MySQL Server 8.0\lib in Run Settings -> Run Environment -> Path, then restart Qt and run the code, Not connected.

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #36

                                      Then again, start your application with the QT_DEBUG_PLUGINS environment variable to see what is happening.

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

                                      S 1 Reply Last reply
                                      1
                                      • SGaistS SGaist

                                        Then again, start your application with the QT_DEBUG_PLUGINS environment variable to see what is happening.

                                        S Offline
                                        S Offline
                                        Stelian
                                        wrote on last edited by Stelian
                                        #37

                                        @SGaist

                                        QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers" ...
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlite.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlite.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QSQLITE"
                                                ]
                                            },
                                            "archreq": 0,
                                            "className": "QSQLiteDriverPlugin",
                                            "debug": false,
                                            "version": 330752
                                        }
                                        
                                        
                                        "The plugin 'C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlite.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                                 not a plugin
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlited.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlited.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QSQLITE"
                                                ]
                                            },
                                            "archreq": 1,
                                            "className": "QSQLiteDriverPlugin",
                                            "debug": true,
                                            "version": 330752
                                        }
                                        
                                        
                                        Got keys from plugin meta data ("QSQLITE")
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysql.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysql.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QMYSQL3",
                                                    "QMYSQL"
                                                ]
                                            },
                                            "archreq": 0,
                                            "className": "QMYSQLDriverPlugin",
                                            "debug": false,
                                            "version": 330752
                                        }
                                        
                                        
                                        "The plugin 'C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                                 not a plugin
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysqld.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysqld.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QMYSQL3",
                                                    "QMYSQL"
                                                ]
                                            },
                                            "archreq": 1,
                                            "className": "QMYSQLDriverPlugin",
                                            "debug": true,
                                            "version": 330752
                                        }
                                        
                                        
                                        Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlodbc.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlodbc.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QODBC3",
                                                    "QODBC"
                                                ]
                                            },
                                            "archreq": 0,
                                            "className": "QODBCDriverPlugin",
                                            "debug": false,
                                            "version": 330752
                                        }
                                        
                                        
                                        "The plugin 'C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlodbc.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                                 not a plugin
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlodbcd.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlodbcd.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QODBC3",
                                                    "QODBC"
                                                ]
                                            },
                                            "archreq": 1,
                                            "className": "QODBCDriverPlugin",
                                            "debug": true,
                                            "version": 330752
                                        }
                                        
                                        
                                        Got keys from plugin meta data ("QODBC3", "QODBC")
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlpsql.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlpsql.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QPSQL7",
                                                    "QPSQL"
                                                ]
                                            },
                                            "archreq": 0,
                                            "className": "QPSQLDriverPlugin",
                                            "debug": false,
                                            "version": 330752
                                        }
                                        
                                        
                                        "The plugin 'C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlpsql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                                 not a plugin
                                        QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlpsqld.dll"
                                        Found metadata in lib C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlpsqld.dll, metadata=
                                        {
                                            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                            "MetaData": {
                                                "Keys": [
                                                    "QPSQL7",
                                                    "QPSQL"
                                                ]
                                            },
                                            "archreq": 1,
                                            "className": "QPSQLDriverPlugin",
                                            "debug": true,
                                            "version": 330752
                                        }
                                        
                                        
                                        Got keys from plugin meta data ("QPSQL7", "QPSQL")
                                        QFactoryLoader::QFactoryLoader() checking directory path "E:/Qt Creator/build-sql_console_test-Desktop_Qt_5_12_1_MinGW_64_bit-Debug/debug/sqldrivers" ...
                                        Cannot load library C:\Qt\Qt5.12.1\5.12.1\mingw73_64\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.
                                        QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.12.1/5.12.1/mingw73_64/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\\Qt\\Qt5.12.1\\5.12.1\\mingw73_64\\plugins\\sqldrivers\\qsqlmysqld.dll: The specified module could not be found."
                                        QSqlDatabase: QMYSQL driver not loaded
                                        QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                                        Database is Not Connected!
                                        
                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #38

                                          Looks like you only built the plugin for release and not for debug and you are running a debug build of your application.

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

                                          S 2 Replies Last reply
                                          2

                                          • Login

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