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. Building database driver, IT difficulties

Building database driver, IT difficulties

Scheduled Pinned Locked Moved Solved General and Desktop
45 Posts 6 Posters 5.8k 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.
  • KroMignonK KroMignon

    @SPlatten said in Building database driver, IT difficulties:

    excellent, thank you.

    your welcome

    SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #14

    @KroMignon , now it all appears to have built without any issues, I'm using source that I wrote on my iMAC when doing the same thing, have put in the database details using driver name QMYSQL, but when I try to connect I get the output:

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
    

    Kind Regards,
    Sy

    JonBJ KroMignonK 2 Replies Last reply
    0
    • SPlattenS SPlatten

      @KroMignon , now it all appears to have built without any issues, I'm using source that I wrote on my iMAC when doing the same thing, have put in the database details using driver name QMYSQL, but when I try to connect I get the output:

      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #15

      @SPlatten
      Whenever you get QMYSQL driver not loaded, start by setting environment variable QT_DEBUG_PLUGINS=1, run application, look at diagnostic output, especially at end.

      SPlattenS 1 Reply Last reply
      1
      • JonBJ JonB

        @SPlatten
        Whenever you get QMYSQL driver not loaded, start by setting environment variable QT_DEBUG_PLUGINS=1, run application, look at diagnostic output, especially at end.

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #16

        @JonB said in Building database driver, IT difficulties:

        QT_DEBUG_PLUGINS

        Thats easier said than done, on this system I cannot set environment variables....

        Kind Regards,
        Sy

        JonBJ KroMignonK 2 Replies Last reply
        0
        • SPlattenS SPlatten

          @KroMignon , now it all appears to have built without any issues, I'm using source that I wrote on my iMAC when doing the same thing, have put in the database details using driver name QMYSQL, but when I try to connect I get the output:

          QSqlDatabase: QMYSQL driver not loaded
          QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
          
          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by
          #17

          @SPlatten said in Building database driver, IT difficulties:

          QSqlDatabase: QMYSQL driver not loaded
          QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7

          I guess the mysql-connector dynamic library (libmysql.dll) is not in your path

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

          1 Reply Last reply
          0
          • SPlattenS SPlatten

            @JonB said in Building database driver, IT difficulties:

            QT_DEBUG_PLUGINS

            Thats easier said than done, on this system I cannot set environment variables....

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #18

            @SPlatten said in Building database driver, IT difficulties:

            Thats easier said than done, on this system I cannot set environment variables....

            That is an unusual statement, I have not heard of such a system. You will have problems if you cannot set environment variables....

            You should be able to do so. Even if you have to write a one-line "wrapper" program....

            SPlattenS 1 Reply Last reply
            0
            • SPlattenS SPlatten

              @JonB said in Building database driver, IT difficulties:

              QT_DEBUG_PLUGINS

              Thats easier said than done, on this system I cannot set environment variables....

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

              @SPlatten said in Building database driver, IT difficulties:

              Thats easier said than done, on this system I cannot set environment variables....

              You can do it with Qt-Creator: Projects / Build & Run, Select "Run", than in "Run Settings"/Environment you can add as many environment variable as you want => cf. https://doc.qt.io/qtcreator/creator-project-settings-environment.html

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

              1 Reply Last reply
              0
              • JonBJ JonB

                @SPlatten said in Building database driver, IT difficulties:

                Thats easier said than done, on this system I cannot set environment variables....

                That is an unusual statement, I have not heard of such a system. You will have problems if you cannot set environment variables....

                You should be able to do so. Even if you have to write a one-line "wrapper" program....

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #20

                @JonB , tell me about it, please read the first post on this thread for more information.

                Kind Regards,
                Sy

                JonBJ 1 Reply Last reply
                0
                • SPlattenS SPlatten

                  @JonB , tell me about it, please read the first post on this thread for more information.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by JonB
                  #21

                  @SPlatten
                  If you mean

                  I cannot modify system environment variables

                  there is no need to set a system variable, only an environment variable for the duration of running your program. Either in a Command Prompt, or as @KroMignon wrote in Qt Creator if you are running from there. Or in a .bat script, or in a one-line "wrapper" C/C++ program. heck, you're running nmake, that I believe sets environment variables, you could even do so from there....

                  And, depending on when Qt produces that runtime error, if it's on the statement which creates a QSqlDatabase, as I think it might be, then you can just set the environment variable in the Qt program you are writing beforehand.

                  SPlattenS 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @SPlatten
                    If you mean

                    I cannot modify system environment variables

                    there is no need to set a system variable, only an environment variable for the duration of running your program. Either in a Command Prompt, or as @KroMignon wrote in Qt Creator if you are running from there. Or in a .bat script, or in a one-line "wrapper" C/C++ program. heck, you're running nmake, that I believe sets environment variables, you could even do so from there....

                    And, depending on when Qt produces that runtime error, if it's on the statement which creates a QSqlDatabase, as I think it might be, then you can just set the environment variable in the Qt program you are writing beforehand.

                    SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #22

                    @JonB , setting an environment variable doesn't help when Qt Creator is running at the system level. Any environment variable added to the console, is only visible to the environment of the console.

                    Kind Regards,
                    Sy

                    JonBJ KroMignonK 2 Replies Last reply
                    0
                    • SPlattenS SPlatten

                      @JonB , setting an environment variable doesn't help when Qt Creator is running at the system level. Any environment variable added to the console, is only visible to the environment of the console.

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by JonB
                      #23

                      @SPlatten
                      I have tried to show you a number of places you can set the environment variable. If you really say you cannot from Qt Creator (I don't understand why not and I don't understand what you are saying), try any of the others....

                      1 Reply Last reply
                      0
                      • SPlattenS SPlatten

                        @JonB , setting an environment variable doesn't help when Qt Creator is running at the system level. Any environment variable added to the console, is only visible to the environment of the console.

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

                        @SPlatten said in Building database driver, IT difficulties:

                        setting an environment variable doesn't help when Qt Creator is running at the system level. Any environment variable added to the console, is only visible to the environment of the console.

                        Have you only try it out?
                        Based on your first post on this thread, you are using Qt Creator 4.4.1.
                        Settings environment variables with QtCreator works for me, on any system I am using (WindowsXP/7/10 and Linux).
                        So I cannot imagine it will not work for you.

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

                        SPlattenS 1 Reply Last reply
                        0
                        • KroMignonK KroMignon

                          @SPlatten said in Building database driver, IT difficulties:

                          setting an environment variable doesn't help when Qt Creator is running at the system level. Any environment variable added to the console, is only visible to the environment of the console.

                          Have you only try it out?
                          Based on your first post on this thread, you are using Qt Creator 4.4.1.
                          Settings environment variables with QtCreator works for me, on any system I am using (WindowsXP/7/10 and Linux).
                          So I cannot imagine it will not work for you.

                          SPlattenS Offline
                          SPlattenS Offline
                          SPlatten
                          wrote on last edited by
                          #25

                          @KroMignon , just created the variable and verified that it is there using EXPORT, rebuilt project in Qt Creator and executed, no new / additional output in Application Output and the console just contains:

                          QSqlDatabase: QMYSQL driver not loaded
                          QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                          

                          Kind Regards,
                          Sy

                          JonBJ KroMignonK 2 Replies Last reply
                          0
                          • SPlattenS SPlatten

                            @KroMignon , just created the variable and verified that it is there using EXPORT, rebuilt project in Qt Creator and executed, no new / additional output in Application Output and the console just contains:

                            QSqlDatabase: QMYSQL driver not loaded
                            QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                            
                            JonBJ Offline
                            JonBJ Offline
                            JonB
                            wrote on last edited by
                            #26

                            @SPlatten
                            What is the name of the environment variable, and what is its value?

                            1 Reply Last reply
                            0
                            • SPlattenS SPlatten

                              @KroMignon , just created the variable and verified that it is there using EXPORT, rebuilt project in Qt Creator and executed, no new / additional output in Application Output and the console just contains:

                              QSqlDatabase: QMYSQL driver not loaded
                              QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                              
                              KroMignonK Offline
                              KroMignonK Offline
                              KroMignon
                              wrote on last edited by KroMignon
                              #27

                              @SPlatten said in Building database driver, IT difficulties:

                              just created the variable and verified that it is there using EXPORT, rebuilt project in Qt Creator and executed, no new / additional output in Application Output and the console just contains:

                              You don't have to recompile your application, just setup the environment variable for you project
                              e1d94075-09a2-4dcb-bfd2-9c78babf80fe-image.png

                              And the run the application with F5 or Ctrl+R, that's it.

                              But as I have written before, I am quiet sure your problem is that the mysql-connector dynamic library is not in your path.
                              The easiest way to solve this is to copy libmysql.dll in to Qt lib path, which should be for Qt 5.9.2 ==> C:\Qt\5.9.2\msvc2015\bin\

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

                              SPlattenS 1 Reply Last reply
                              2
                              • KroMignonK KroMignon

                                @SPlatten said in Building database driver, IT difficulties:

                                just created the variable and verified that it is there using EXPORT, rebuilt project in Qt Creator and executed, no new / additional output in Application Output and the console just contains:

                                You don't have to recompile your application, just setup the environment variable for you project
                                e1d94075-09a2-4dcb-bfd2-9c78babf80fe-image.png

                                And the run the application with F5 or Ctrl+R, that's it.

                                But as I have written before, I am quiet sure your problem is that the mysql-connector dynamic library is not in your path.
                                The easiest way to solve this is to copy libmysql.dll in to Qt lib path, which should be for Qt 5.9.2 ==> C:\Qt\5.9.2\msvc2015\bin\

                                SPlattenS Offline
                                SPlattenS Offline
                                SPlatten
                                wrote on last edited by SPlatten
                                #28

                                @KroMignon thank you...again!

                                This is the output from my application:

                                Client name - Training Server
                                 
                                Initialising application core...
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms" ...
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "direct2d"
                                        ]
                                    },
                                    "className": "QWindowsDirect2DIntegrationPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "direct2d"
                                        ]
                                    },
                                    "className": "QWindowsDirect2DIntegrationPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("direct2d")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "minimal"
                                        ]
                                    },
                                    "className": "QMinimalIntegrationPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "minimal"
                                        ]
                                    },
                                    "className": "QMinimalIntegrationPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("minimal")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "offscreen"
                                        ]
                                    },
                                    "className": "QOffscreenIntegrationPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "offscreen"
                                        ]
                                    },
                                    "className": "QOffscreenIntegrationPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("offscreen")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                           "windows"
                                        ]
                                    },
                                    "className": "QWindowsIntegrationPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                    "MetaData": {
                                        "Keys": [
                                            "windows"
                                        ]
                                    },
                                    "className": "QWindowsIntegrationPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("windows")
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platforms" ...
                                loaded library "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll"
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platformthemes" ...
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platformthemes" ...
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/styles" ...
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/styles" ...
                                Connecting to database...
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers" ...
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QSQLITE"
                                        ]
                                    },
                                    "className": "QSQLiteDriverPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QSQLITE"
                                        ]
                                    },
                                    "className": "QSQLiteDriverPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("QSQLITE")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QMYSQL3",
                                            "QMYSQL"
                                        ]
                                    },
                                    "className": "QMYSQLDriverPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QMYSQL3",
                                            "QMYSQL"
                                        ]
                                    },
                                    "className": "QMYSQLDriverPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QODBC3",
                                            "QODBC"
                                        ]
                                    },
                                    "className": "QODBCDriverPlugin",
                                    "debug": false,
                                    "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QODBC3",
                                            "QODBC"
                                        ]
                                    },
                                    "className": "QODBCDriverPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("QODBC3", "QODBC")
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QPSQL7",
                                            "QPSQL"
                                        ]
                                    },
                                    "className": "QPSQLDriverPlugin",
                                    "debug": false,
                                   "version": 329986
                                }
                                 
                                 
                                "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                         not a plugin
                                QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll"
                                Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll, metadata=
                                {
                                    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                    "MetaData": {
                                        "Keys": [
                                            "QPSQL7",
                                            "QPSQL"
                                        ]
                                    },
                                    "className": "QPSQLDriverPlugin",
                                    "debug": true,
                                    "version": 329986
                                }
                                 
                                 
                                Got keys from plugin meta data ("QPSQL7", "QPSQL")
                                QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/sqldrivers" ...
                                Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.
                                QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\\Qt\\Qt5.9.2\\5.9.2\\msvc2015\\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
                                

                                Kind Regards,
                                Sy

                                KroMignonK 1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  @KroMignon thank you...again!

                                  This is the output from my application:

                                  Client name - Training Server
                                   
                                  Initialising application core...
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms" ...
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "direct2d"
                                          ]
                                      },
                                      "className": "QWindowsDirect2DIntegrationPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qdirect2dd.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "direct2d"
                                          ]
                                      },
                                      "className": "QWindowsDirect2DIntegrationPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("direct2d")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "minimal"
                                          ]
                                      },
                                      "className": "QMinimalIntegrationPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qminimald.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "minimal"
                                          ]
                                      },
                                      "className": "QMinimalIntegrationPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("minimal")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "offscreen"
                                          ]
                                      },
                                      "className": "QOffscreenIntegrationPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qoffscreend.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "offscreen"
                                          ]
                                      },
                                      "className": "QOffscreenIntegrationPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("offscreen")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                             "windows"
                                          ]
                                      },
                                      "className": "QWindowsIntegrationPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                      "MetaData": {
                                          "Keys": [
                                              "windows"
                                          ]
                                      },
                                      "className": "QWindowsIntegrationPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("windows")
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platforms" ...
                                  loaded library "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platforms/qwindowsd.dll"
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/platformthemes" ...
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/platformthemes" ...
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/styles" ...
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/styles" ...
                                  Connecting to database...
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers" ...
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QSQLITE"
                                          ]
                                      },
                                      "className": "QSQLiteDriverPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlite.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlited.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QSQLITE"
                                          ]
                                      },
                                      "className": "QSQLiteDriverPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("QSQLITE")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QMYSQL3",
                                              "QMYSQL"
                                          ]
                                      },
                                      "className": "QMYSQLDriverPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QMYSQL3",
                                              "QMYSQL"
                                          ]
                                      },
                                      "className": "QMYSQLDriverPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QODBC3",
                                              "QODBC"
                                          ]
                                      },
                                      "className": "QODBCDriverPlugin",
                                      "debug": false,
                                      "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbc.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlodbcd.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QODBC3",
                                              "QODBC"
                                          ]
                                      },
                                      "className": "QODBCDriverPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("QODBC3", "QODBC")
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QPSQL7",
                                              "QPSQL"
                                          ]
                                      },
                                      "className": "QPSQLDriverPlugin",
                                      "debug": false,
                                     "version": 329986
                                  }
                                   
                                   
                                  "The plugin 'C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsql.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                                           not a plugin
                                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll"
                                  Found metadata in lib C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlpsqld.dll, metadata=
                                  {
                                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                      "MetaData": {
                                          "Keys": [
                                              "QPSQL7",
                                              "QPSQL"
                                          ]
                                      },
                                      "className": "QPSQLDriverPlugin",
                                      "debug": true,
                                      "version": 329986
                                  }
                                   
                                   
                                  Got keys from plugin meta data ("QPSQL7", "QPSQL")
                                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/vechicle-training-server-application/build-training-server-application-Desktop_Qt_5_9_2_MSVC2015_32bit-Debug/debug/sqldrivers" ...
                                  Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.
                                  QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\\Qt\\Qt5.9.2\\5.9.2\\msvc2015\\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
                                  
                                  KroMignonK Offline
                                  KroMignonK Offline
                                  KroMignon
                                  wrote on last edited by KroMignon
                                  #29

                                  @SPlatten said in Building database driver, IT difficulties:

                                  Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.

                                  QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found."

                                  QSqlDatabase: QMYSQL driver not loaded

                                  It looks like your are running debug version, but did not build plugin for debug, only release build is done.
                                  I think you have to (re)build mysql plugin and add "CONFIG+=debug" to ensure building version of plugin.
                                  Something like:

                                  qmake "CONFIG+=debug" -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
                                  

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

                                  SPlattenS 2 Replies Last reply
                                  2
                                  • KroMignonK KroMignon

                                    @SPlatten said in Building database driver, IT difficulties:

                                    Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.

                                    QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found."

                                    QSqlDatabase: QMYSQL driver not loaded

                                    It looks like your are running debug version, but did not build plugin for debug, only release build is done.
                                    I think you have to (re)build mysql plugin and add "CONFIG+=debug" to ensure building version of plugin.
                                    Something like:

                                    qmake "CONFIG+=debug" -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
                                    
                                    SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by
                                    #30

                                    @KroMignon , thanks again!

                                    Kind Regards,
                                    Sy

                                    1 Reply Last reply
                                    0
                                    • KroMignonK KroMignon

                                      @SPlatten said in Building database driver, IT difficulties:

                                      Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found.

                                      QLibraryPrivate::loadPlugin failed on "C:/Qt/Qt5.9.2/5.9.2/msvc2015/plugins/sqldrivers/qsqlmysqld.dll" : "Cannot load library C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlmysqld.dll: The specified module could not be found."

                                      QSqlDatabase: QMYSQL driver not loaded

                                      It looks like your are running debug version, but did not build plugin for debug, only release build is done.
                                      I think you have to (re)build mysql plugin and add "CONFIG+=debug" to ensure building version of plugin.
                                      Something like:

                                      qmake "CONFIG+=debug" -- MYSQL_INCDIR=c:/mysql-connector-6.1.5/include MYSQL_LIBDIR=c:/mysql-connector-6.1.5/lib
                                      
                                      SPlattenS Offline
                                      SPlattenS Offline
                                      SPlatten
                                      wrote on last edited by SPlatten
                                      #31

                                      @KroMignon , here is the output from the latest modifications, this time it should be building release then debug:

                                      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:
                                        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 'nmake'.
                                      Once everything is built, Qt is installed.
                                      You should NOT run 'nmake install'.
                                      Note that this build cannot be deployed to other machines or devices.
                                       
                                      Prior to reconfiguration, make sure you remove any leftovers from
                                      the previous build.
                                       
                                      Debug...
                                       
                                      Running configuration tests...
                                      Done running configuration tests.
                                       
                                      Configure summary:
                                       
                                      Qt Sql:
                                        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 'nmake'.
                                      Once everything is built, Qt is installed.
                                      You should NOT run 'nmake install'.
                                      Note that this build cannot be deployed to other machines or devices.
                                       
                                      Prior to reconfiguration, make sure you remove any leftovers from
                                      the previous build.
                                       
                                      Running nmake
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              cd odbc\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release all
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug all
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              cd sqlite\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release all
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug all
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                      Running nmake install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              cd odbc\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              copy /y ..\plugins\sqldrivers\qsqlodbc.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbc.dll
                                              1 file(s) copied.
                                              copy /y ..\plugins\sqldrivers\qsqlodbc.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbc.pdb
                                              1 file(s) copied.
                                              c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              copy /y ..\plugins\sqldrivers\qsqlodbcd.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbcd.dll
                                              1 file(s) copied.
                                              copy /y ..\plugins\sqldrivers\qsqlodbcd.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbcd.pdb
                                              1 file(s) copied.
                                              c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                                              cd sqlite\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              copy /y ..\plugins\sqldrivers\qsqlite.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlite.dll
                                              1 file(s) copied.
                                              copy /y ..\plugins\sqldrivers\qsqlite.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlite.pdb
                                              1 file(s) copied.
                                              C:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                                              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug install
                                       
                                      Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                      Copyright (C) Microsoft Corporation.  All rights reserved.
                                       
                                              copy /y ..\plugins\sqldrivers\qsqlited.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlited.dll
                                              1 file(s) copied.
                                              copy /y ..\plugins\sqldrivers\qsqlited.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlited.pdb
                                              1 file(s) copied.
                                              C:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                                      

                                      Same result, still not loading driver.

                                      Kind Regards,
                                      Sy

                                      KroMignonK 1 Reply Last reply
                                      0
                                      • SPlattenS SPlatten

                                        @KroMignon , here is the output from the latest modifications, this time it should be building release then debug:

                                        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:
                                          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 'nmake'.
                                        Once everything is built, Qt is installed.
                                        You should NOT run 'nmake install'.
                                        Note that this build cannot be deployed to other machines or devices.
                                         
                                        Prior to reconfiguration, make sure you remove any leftovers from
                                        the previous build.
                                         
                                        Debug...
                                         
                                        Running configuration tests...
                                        Done running configuration tests.
                                         
                                        Configure summary:
                                         
                                        Qt Sql:
                                          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 'nmake'.
                                        Once everything is built, Qt is installed.
                                        You should NOT run 'nmake install'.
                                        Note that this build cannot be deployed to other machines or devices.
                                         
                                        Prior to reconfiguration, make sure you remove any leftovers from
                                        the previous build.
                                         
                                        Running nmake
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                cd odbc\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release all
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug all
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                cd sqlite\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release all
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug all
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                        Running nmake install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                cd odbc\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\odbc\odbc.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                copy /y ..\plugins\sqldrivers\qsqlodbc.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbc.dll
                                                1 file(s) copied.
                                                copy /y ..\plugins\sqldrivers\qsqlodbc.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbc.pdb
                                                1 file(s) copied.
                                                c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                copy /y ..\plugins\sqldrivers\qsqlodbcd.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbcd.dll
                                                1 file(s) copied.
                                                copy /y ..\plugins\sqldrivers\qsqlodbcd.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlodbcd.pdb
                                                1 file(s) copied.
                                                c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QODBCDriverPlugin.cmake
                                                cd sqlite\ && ( if not exist Makefile c:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -o Makefile C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\sqlite\sqlite.pro "CONFIG+=debug" ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                copy /y ..\plugins\sqldrivers\qsqlite.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlite.dll
                                                1 file(s) copied.
                                                copy /y ..\plugins\sqldrivers\qsqlite.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlite.pdb
                                                1 file(s) copied.
                                                C:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                                                "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Debug install
                                         
                                        Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
                                        Copyright (C) Microsoft Corporation.  All rights reserved.
                                         
                                                copy /y ..\plugins\sqldrivers\qsqlited.dll C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlited.dll
                                                1 file(s) copied.
                                                copy /y ..\plugins\sqldrivers\qsqlited.pdb C:\Qt\Qt5.9.2\5.9.2\msvc2015\plugins\sqldrivers\qsqlited.pdb
                                                1 file(s) copied.
                                                C:\Qt\Qt5.9.2\5.9.2\msvc2015\bin\qmake.exe -install qinstall C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldrivers\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake C:\Qt\Qt5.9.2\5.9.2\msvc2015\lib\cmake\Qt5Sql\Qt5Sql_QSQLiteDriverPlugin.cmake
                                        

                                        Same result, still not loading driver.

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

                                        @SPlatten said in Building database driver, IT difficulties:

                                        here is the output from the latest modifications, this time it should be being release then debug:

                                        Checking for MySQL... no

                                        I think you have not set the environment variable as required for your build.
                                        As you are building for 32 bit, you should do something like:

                                        "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
                                        

                                        And, of course, download the 32 bit version of MySQL connector!

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

                                        SPlattenS 1 Reply Last reply
                                        0
                                        • KroMignonK KroMignon

                                          @SPlatten said in Building database driver, IT difficulties:

                                          here is the output from the latest modifications, this time it should be being release then debug:

                                          Checking for MySQL... no

                                          I think you have not set the environment variable as required for your build.
                                          As you are building for 32 bit, you should do something like:

                                          "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
                                          

                                          And, of course, download the 32 bit version of MySQL connector!

                                          SPlattenS Offline
                                          SPlattenS Offline
                                          SPlatten
                                          wrote on last edited by SPlatten
                                          #33

                                          @KroMignon , just checked the source for vcvarsall.bat, if no command line arguments are passed then it defaults to x86.

                                          This is my build batch file:

                                          echo Cleaning cache
                                          @rm -R config.*
                                          echo Calling vcvarsall.bat
                                          @call "c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat"
                                          echo Running qmake
                                          echo Release...
                                          @c:/Qt/Qt5.9.2/5.9.2/msvc2015/bin/qmake -- MYSQL_INCDIR="/c/Program Files (x86)/MariaDB 10.5/include/mysql" MYSQL_LIBDIR="/c/Program Files (x86)/MariaDB 10.5/lib" MYSQL_LIBS="-lmariadb"
                                          echo Debug...
                                          @c:/Qt/Qt5.9.2/5.9.2/msvc2015/bin/qmake "CONFIG+=debug" -- MYSQL_INCDIR="/c/Program Files (x86)/MariaDB 10.5/include/mysql" MYSQL_LIBDIR="/c/Program Files (x86)/MariaDB 10.5/lib" MYSQL_LIBS="-lmariadb"
                                          echo Running nmake
                                          @nmake
                                          echo Running nmake install
                                          @nmake install
                                          

                                          Kind Regards,
                                          Sy

                                          KroMignonK 1 Reply Last reply
                                          0

                                          • Login

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