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. QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL
QtWS25 Last Chance

QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL

Scheduled Pinned Locked Moved Solved General and Desktop
35 Posts 9 Posters 6.1k Views
  • 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.
  • J Offline
    J Offline
    JonnyQB
    wrote on last edited by
    #1

    hi there,
    i need help i just cant figure it out.
    i almost tried everything out here is my code:
    #include "login.h"
    #include "ui_login.h"

    Login::Login(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::Login)
    {

    ui->setupUi(this);
    QGraphicsScene scene;
    QPixmap pixmap(":/logo.jpg");
    scene.addPixmap(pixmap);
    ui->graphicsView->setScene(&scene);
    QSqlDatabase Logindb=QSqlDatabase::addDatabase("QMYSQL");
    Logindb.setHostName("127.0.0.1");
    Logindb.setPort(3306);
    Logindb.setDatabaseName("agr_kako");
    Logindb.setUserName("root");
    Logindb.setPassword("1234");
    Logindb.open();
    
    if(!Logindb.open())
    {ui->label_3->setText("Failed to open the database");}
    else
        ui->label_3->setText("Connected");
    

    }

    Login::~Login()
    {
    delete ui;
    }

    void Login::on_pushButton_signin_clicked()
    {

    Logindb.open();
    QString username,passwort;
    username=ui->lineEdit_User->text();
    passwort=ui->lineEdit_Password->text();
    

    // QSqlQuery qry;
    // if(qry.exec("select * from login where Nachname='"+username+"'and Passwort'"+passwort+"'"))
    // {
    // int count=0;
    // while(qry.next())
    // {
    // count++;
    // }
    // if(count==1)
    // ui->label_3->setText("Login erfolgreich");
    // if(count>1)
    // ui->label_3->setText("");
    // if(count==1)
    // ui->label_3->setText("Login fehlgeschlagen Passwort oder Name falsch");
    // }
    // if(!Logindb.isOpen())
    // {
    // qDebug()<<"Verbindung zur Datenbank verloren";
    // return;
    // }

    parameter=new Parameter(this);
    parameter->show();
    hide();
    

    }
    and here is my output:
    10:48:54: Starte E:\qtprojekts\build-AGR-KAKO-Desktop_Qt_5_15_0_MinGW_64_bit-Debug\debug\sqlTest.exe ...
    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7

    my database is a localhost mariadb wich is called agr_kako and the table is called login and has 2 names in it.

    jsulmJ 1 Reply Last reply
    0
    • J JonnyQB

      hi there,
      i need help i just cant figure it out.
      i almost tried everything out here is my code:
      #include "login.h"
      #include "ui_login.h"

      Login::Login(QWidget *parent)
      : QMainWindow(parent)
      , ui(new Ui::Login)
      {

      ui->setupUi(this);
      QGraphicsScene scene;
      QPixmap pixmap(":/logo.jpg");
      scene.addPixmap(pixmap);
      ui->graphicsView->setScene(&scene);
      QSqlDatabase Logindb=QSqlDatabase::addDatabase("QMYSQL");
      Logindb.setHostName("127.0.0.1");
      Logindb.setPort(3306);
      Logindb.setDatabaseName("agr_kako");
      Logindb.setUserName("root");
      Logindb.setPassword("1234");
      Logindb.open();
      
      if(!Logindb.open())
      {ui->label_3->setText("Failed to open the database");}
      else
          ui->label_3->setText("Connected");
      

      }

      Login::~Login()
      {
      delete ui;
      }

      void Login::on_pushButton_signin_clicked()
      {

      Logindb.open();
      QString username,passwort;
      username=ui->lineEdit_User->text();
      passwort=ui->lineEdit_Password->text();
      

      // QSqlQuery qry;
      // if(qry.exec("select * from login where Nachname='"+username+"'and Passwort'"+passwort+"'"))
      // {
      // int count=0;
      // while(qry.next())
      // {
      // count++;
      // }
      // if(count==1)
      // ui->label_3->setText("Login erfolgreich");
      // if(count>1)
      // ui->label_3->setText("");
      // if(count==1)
      // ui->label_3->setText("Login fehlgeschlagen Passwort oder Name falsch");
      // }
      // if(!Logindb.isOpen())
      // {
      // qDebug()<<"Verbindung zur Datenbank verloren";
      // return;
      // }

      parameter=new Parameter(this);
      parameter->show();
      hide();
      

      }
      and here is my output:
      10:48:54: Starte E:\qtprojekts\build-AGR-KAKO-Desktop_Qt_5_15_0_MinGW_64_bit-Debug\debug\sqlTest.exe ...
      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7

      my database is a localhost mariadb wich is called agr_kako and the table is called login and has 2 names in it.

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

      @JonnyQB Please search in the forum for mysql issues. This is asked very often and was discussed many times.

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

      J 1 Reply Last reply
      2
      • jsulmJ jsulm

        @JonnyQB Please search in the forum for mysql issues. This is asked very often and was discussed many times.

        J Offline
        J Offline
        JonnyQB
        wrote on last edited by
        #3

        @jsulm yeah i looked already but alll solutions couldn´t help me out

        jsulmJ 1 Reply Last reply
        0
        • J JonnyQB

          @jsulm yeah i looked already but alll solutions couldn´t help me out

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

          @JonnyQB What did you try? Most probably you do not have MySQL client libs.
          Set QT_DEBUG_PLUGINS (https://doc.qt.io/qt-5/deployment-plugins.html) before starting your app, then start your app and check the output.

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

          1 Reply Last reply
          3
          • J Offline
            J Offline
            JonnyQB
            wrote on last edited by
            #5

            E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"

            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 'E:\Programme\qt\Tools\5.15.0\mingw81_64'.

            Prior to reconfiguration, make sure you remove any leftovers from
            the previous build.
            i tried building but now i got this....

            jsulmJ 1 Reply Last reply
            0
            • J JonnyQB

              E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"

              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 'E:\Programme\qt\Tools\5.15.0\mingw81_64'.

              Prior to reconfiguration, make sure you remove any leftovers from
              the previous build.
              i tried building but now i got this....

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

              @JonnyQB What compiler do you use?
              Also, you can check config.log file to see why MySql was disabled.

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

              J 1 Reply Last reply
              0
              • jsulmJ jsulm

                @JonnyQB What compiler do you use?
                Also, you can check config.log file to see why MySql was disabled.

                J Offline
                J Offline
                JonnyQB
                wrote on last edited by
                #7

                @jsulm
                i use mingw81_64
                wich config.log do you mean and where could i find it

                jsulmJ 1 Reply Last reply
                0
                • J JonnyQB

                  @jsulm
                  i use mingw81_64
                  wich config.log do you mean and where could i find it

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

                  @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                  wich config.log do you mean and where could i find it

                  In the build folder (from where you called qmake)

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

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JonnyQB
                    wrote on last edited by JonnyQB
                    #9

                    @jsulm
                    i got this
                    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
                    loaded result for library config.sqldrivers.libraries.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
                    loaded result for library config.sqldrivers.libraries.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
                    loaded result for library config.sqldrivers.libraries.tds
                    Trying source 0 (type sybaseEnv) of library tds ...

                    • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && E:\Programme\qt\Tools\5.15.0\mingw81_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" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                      Project ERROR: Cannot run compiler 'g++'. Output:
                      ===================
                      ===================
                      Maybe you forgot to setup the environment?
                      => source failed verification.
                      Trying source 1 (type sybaseEnv) of library tds ...
                      => source failed condition '!config.win32'.
                      test config.sqldrivers.libraries.tds FAILED

                    what should i do

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

                      @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                      what should i do

                      make sure you open the correct Qt command prompt where a g++ compiler is available.

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

                      J 2 Replies Last reply
                      1
                      • J JonnyQB

                        @jsulm
                        i got this
                        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
                        loaded result for library config.sqldrivers.libraries.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
                        loaded result for library config.sqldrivers.libraries.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
                        loaded result for library config.sqldrivers.libraries.tds
                        Trying source 0 (type sybaseEnv) of library tds ...

                        • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && E:\Programme\qt\Tools\5.15.0\mingw81_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" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                          Project ERROR: Cannot run compiler 'g++'. Output:
                          ===================
                          ===================
                          Maybe you forgot to setup the environment?
                          => source failed verification.
                          Trying source 1 (type sybaseEnv) of library tds ...
                          => source failed condition '!config.win32'.
                          test config.sqldrivers.libraries.tds FAILED

                        what should i do

                        T Offline
                        T Offline
                        thecodemonkey
                        wrote on last edited by thecodemonkey
                        #11

                        @JonnyQB you could use my precompiled QMYSQL driver from https://github.com/thecodemonkey86/qt_mysql_driver if you like. I tested it with MariaDB as well

                        1 Reply Last reply
                        0
                        • Christian EhrlicherC Christian Ehrlicher

                          @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                          what should i do

                          make sure you open the correct Qt command prompt where a g++ compiler is available.

                          J Offline
                          J Offline
                          JonnyQB
                          wrote on last edited by
                          #12

                          @Christian-Ehrlicher
                          i set the path to both files like in the doc from qt.

                          1 Reply Last reply
                          0
                          • Christian EhrlicherC Christian Ehrlicher

                            @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                            what should i do

                            make sure you open the correct Qt command prompt where a g++ compiler is available.

                            J Offline
                            J Offline
                            JonnyQB
                            wrote on last edited by
                            #13

                            @Christian-Ehrlicher
                            E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"

                            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 'E:\Programme\qt\Tools\5.15.0\mingw81_64'.

                            Prior to reconfiguration, make sure you remove any leftovers from
                            the previous build.

                            E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>where g++
                            E:\Programme\qt\Tools\mingw810_64\bin\g++.exe

                            E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>where gcc
                            E:\Programme\qt\Tools\mingw810_64\bin\gcc.exe

                            1 Reply Last reply
                            0
                            • hskoglundH Offline
                              hskoglundH Offline
                              hskoglund
                              wrote on last edited by
                              #14

                              Hi, just to check, remember to remove the config.cache file before you run configure. This is easy to forget (I did :-) here's an answer from a previous, similar discussion:

                              @Bonnie said in Set-up MariaDB library file location programmatically?:

                              @SPlatten
                              It is actually in the doc:

                              If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again.

                              I think the doc should make that sentence more sight-catching.
                              Many people who had their first qmake command unsuccessful would be stucked there, with a never-changing config.log.

                              SGaistS J 2 Replies Last reply
                              1
                              • hskoglundH hskoglund

                                Hi, just to check, remember to remove the config.cache file before you run configure. This is easy to forget (I did :-) here's an answer from a previous, similar discussion:

                                @Bonnie said in Set-up MariaDB library file location programmatically?:

                                @SPlatten
                                It is actually in the doc:

                                If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again.

                                I think the doc should make that sentence more sight-catching.
                                Many people who had their first qmake command unsuccessful would be stucked there, with a never-changing config.log.

                                SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                @hskoglund next release of the documentation shall have that modification :-)

                                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
                                • hskoglundH hskoglund

                                  Hi, just to check, remember to remove the config.cache file before you run configure. This is easy to forget (I did :-) here's an answer from a previous, similar discussion:

                                  @Bonnie said in Set-up MariaDB library file location programmatically?:

                                  @SPlatten
                                  It is actually in the doc:

                                  If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again.

                                  I think the doc should make that sentence more sight-catching.
                                  Many people who had their first qmake command unsuccessful would be stucked there, with a never-changing config.log.

                                  J Offline
                                  J Offline
                                  JonnyQB
                                  wrote on last edited by
                                  #16

                                  @hskoglund

                                  E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"

                                  Running configuration tests...
                                  Checking for DB2 (IBM)... no
                                  Checking for InterBase... no
                                  Checking for MySQL... no
                                  Checking for OCI (Oracle)... no
                                  Checking for ODBC... yes
                                  Checking for PostgreSQL... no
                                  Checking for SQLite (version 2)... no
                                  Checking for TDS (Sybase)... no
                                  Done running configuration tests.

                                  Configure summary:

                                  Qt Sql Drivers:
                                  DB2 (IBM) .............................. no
                                  InterBase .............................. no
                                  MySql .................................. no
                                  OCI (Oracle) ........................... no
                                  ODBC ................................... yes
                                  PostgreSQL ............................. no
                                  SQLite2 ................................ no
                                  SQLite ................................. yes
                                  Using system provided SQLite ......... no
                                  TDS (Sybase) ........................... no

                                  Qt is now configured for building. Just run 'mingw32-make'.
                                  Once everything is built, you must run 'mingw32-make install'.
                                  Qt will be installed into 'E:\Programme\qt\Tools\5.15.0\mingw81_64'.

                                  Prior to reconfiguration, make sure you remove any leftovers from
                                  the previous build.

                                  but i still get this
                                  and i need mysql ....

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    JonnyQB
                                    wrote on last edited by
                                    #17

                                    @jsulm
                                    Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"
                                    Global lib dirs: [C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib] [E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0 E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc E:/Programme/qt/Tools/Tools/mingw810_64/x86_64-w64-mingw32/lib E:/Programme/qt/Tools/Tools/mingw810_64/lib]
                                    Global inc dirs: [C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\include] [E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++ E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32 E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed E:/Programme/qt/Tools/Tools/mingw810_64/x86_64-w64-mingw32/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 ...
                                    mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"] and global paths.
                                    => source produced no result.
                                    Trying source 6 (type inline) of library mysql ...
                                    mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"] and global paths.
                                    => source produced no result.
                                    Trying source 7 (type inline) of library mysql ...
                                    => source failed condition '!config.win32'.
                                    Trying source 8 (type inline) of library mysql ...
                                    => source failed condition '!config.win32'.
                                    test config.sqldrivers.libraries.mysql FAILED
                                    looking for library oci
                                    Trying source 0 (type inline) of library oci ...
                                    oci.h not found in [] and global paths.
                                    => source produced no result.
                                    Trying source 1 (type inline) of library oci ...
                                    => source failed condition '!config.win32'.
                                    test config.sqldrivers.libraries.oci FAILED
                                    looking for library odbc
                                    Trying source 0 (type inline) of library odbc ...

                                    • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && E:\Programme\qt\Tools\5.15.0\mingw81_64\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += odbc" "QMAKE_LIBS_ODBC = -lodbc32" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/odbc
                                    • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

                                    del main.o
                                    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IE:\Programme\qt\Tools\5.15.0\mingw81_64\mkspecs\win32-g++ -o main.o main.cpp
                                    g++ -Wl,-s -Wl,-subsystem,console -mthreads -o odbc.exe main.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib -lodbc32
                                    => source accepted.
                                    test config.sqldrivers.libraries.odbc succeeded
                                    looking for library psql
                                    Trying source 0 (type pkgConfig) of library psql ...
                                    pkg-config use disabled globally.
                                    => source produced no result.
                                    Trying source 1 (type psqlConfig) of library psql ...
                                    pg_config not found.
                                    => source produced no result.
                                    Trying source 2 (type psqlEnv) of library psql ...
                                    libpq-fe.h not found in [] and global paths.
                                    => source produced no result.
                                    Trying source 3 (type psqlEnv) of library psql ...
                                    => source failed condition '!config.win32'.
                                    test config.sqldrivers.libraries.psql FAILED
                                    looking for library sqlite2
                                    Trying source 0 (type inline) of library sqlite2 ...
                                    sqlite.h not found in [] and global paths.
                                    => source produced no result.
                                    test config.sqldrivers.libraries.sqlite2 FAILED
                                    looking for library tds
                                    Trying source 0 (type sybaseEnv) of library tds ...

                                    • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && E:\Programme\qt\Tools\5.15.0\mingw81_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" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                                    • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

                                    del main.o
                                    E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds\main.o konnte nicht gefunden werden
                                    g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IE:\Programme\qt\Tools\5.15.0\mingw81_64\mkspecs\win32-g++ -o main.o main.cpp
                                    main.cpp:2:10: fatal error: sybfront.h: No such file or directory
                                    #include <sybfront.h>
                                    ^~~~~~~~~~~~
                                    compilation terminated.
                                    mingw32-make: *** [Makefile:498: main.o] Error 1
                                    => source failed verification.
                                    Trying source 1 (type sybaseEnv) of library tds ...
                                    => source failed condition '!config.win32'.
                                    test config.sqldrivers.libraries.tds FAILED

                                    and this is the config ...

                                    Christian EhrlicherC 1 Reply Last reply
                                    0
                                    • J JonnyQB

                                      @jsulm
                                      Command line: "MYSQL_INCDIR=C:/Program Files/MySQL/MySQL Connector C++ 8.0/include" "MYSQL_LIBDIR=C:/Program Files/MySQL/MySQL Connector C++ 8.0//lib"
                                      Global lib dirs: [C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib] [E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0 E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc E:/Programme/qt/Tools/Tools/mingw810_64/x86_64-w64-mingw32/lib E:/Programme/qt/Tools/Tools/mingw810_64/lib]
                                      Global inc dirs: [C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\include] [E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++ E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32 E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include E:/Programme/qt/Tools/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed E:/Programme/qt/Tools/Tools/mingw810_64/x86_64-w64-mingw32/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 ...
                                      mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"] and global paths.
                                      => source produced no result.
                                      Trying source 6 (type inline) of library mysql ...
                                      mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"] and global paths.
                                      => source produced no result.
                                      Trying source 7 (type inline) of library mysql ...
                                      => source failed condition '!config.win32'.
                                      Trying source 8 (type inline) of library mysql ...
                                      => source failed condition '!config.win32'.
                                      test config.sqldrivers.libraries.mysql FAILED
                                      looking for library oci
                                      Trying source 0 (type inline) of library oci ...
                                      oci.h not found in [] and global paths.
                                      => source produced no result.
                                      Trying source 1 (type inline) of library oci ...
                                      => source failed condition '!config.win32'.
                                      test config.sqldrivers.libraries.oci FAILED
                                      looking for library odbc
                                      Trying source 0 (type inline) of library odbc ...

                                      • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && E:\Programme\qt\Tools\5.15.0\mingw81_64\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\openssl\lib C:\Utils\my_sql\mysql-5.7.25-winx64\lib C:\Utils\postgresql\pgsql\lib" "INCLUDEPATH += C:\openssl\include C:\Utils\my_sql\mysql-5.7.25-winx64\include C:\Utils\postgresql\pgsql\include" "QMAKE_USE += odbc" "QMAKE_LIBS_ODBC = -lodbc32" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/odbc
                                      • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\odbc && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

                                      del main.o
                                      g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IE:\Programme\qt\Tools\5.15.0\mingw81_64\mkspecs\win32-g++ -o main.o main.cpp
                                      g++ -Wl,-s -Wl,-subsystem,console -mthreads -o odbc.exe main.o -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib -lodbc32
                                      => source accepted.
                                      test config.sqldrivers.libraries.odbc succeeded
                                      looking for library psql
                                      Trying source 0 (type pkgConfig) of library psql ...
                                      pkg-config use disabled globally.
                                      => source produced no result.
                                      Trying source 1 (type psqlConfig) of library psql ...
                                      pg_config not found.
                                      => source produced no result.
                                      Trying source 2 (type psqlEnv) of library psql ...
                                      libpq-fe.h not found in [] and global paths.
                                      => source produced no result.
                                      Trying source 3 (type psqlEnv) of library psql ...
                                      => source failed condition '!config.win32'.
                                      test config.sqldrivers.libraries.psql FAILED
                                      looking for library sqlite2
                                      Trying source 0 (type inline) of library sqlite2 ...
                                      sqlite.h not found in [] and global paths.
                                      => source produced no result.
                                      test config.sqldrivers.libraries.sqlite2 FAILED
                                      looking for library tds
                                      Trying source 0 (type sybaseEnv) of library tds ...

                                      • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && E:\Programme\qt\Tools\5.15.0\mingw81_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" E:/Programme/qt/Tools/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                                      • cd /d E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make

                                      del main.o
                                      E:\Programme\qt\Tools\5.15.0\Src\qtbase\src\plugins\sqldrivers\config.tests\tds\main.o konnte nicht gefunden werden
                                      g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\openssl\include -IC:\Utils\my_sql\mysql-5.7.25-winx64\include -IC:\Utils\postgresql\pgsql\include -IE:\Programme\qt\Tools\5.15.0\mingw81_64\mkspecs\win32-g++ -o main.o main.cpp
                                      main.cpp:2:10: fatal error: sybfront.h: No such file or directory
                                      #include <sybfront.h>
                                      ^~~~~~~~~~~~
                                      compilation terminated.
                                      mingw32-make: *** [Makefile:498: main.o] Error 1
                                      => source failed verification.
                                      Trying source 1 (type sybaseEnv) of library tds ...
                                      => source failed condition '!config.win32'.
                                      test config.sqldrivers.libraries.tds FAILED

                                      and this is the config ...

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

                                      @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                                      mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"]

                                      So is your mysql.h in this directory or did you install it in another place?

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

                                      J 1 Reply Last reply
                                      0
                                      • Christian EhrlicherC Christian Ehrlicher

                                        @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                                        mysql.h not found in ["C:/Program Files/MySQL/MySQL Connector C++ 8.0/include"]

                                        So is your mysql.h in this directory or did you install it in another place?

                                        J Offline
                                        J Offline
                                        JonnyQB
                                        wrote on last edited by
                                        #19

                                        @Christian-Ehrlicher
                                        i tried 2 seperate connectsUnbenannt.PNG

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

                                          @JonnyQB said in QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 I need QMYSQL:

                                          C:/Program Files/MySQL/MySQL Connector C++ 8.0/include

                                          So why do you pass the wrong path to qmake then??

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

                                          J 2 Replies 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