Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QPSQL Driver Not found (Qt 5.5.1 & PostgreSQL 9.5)
Forum Updated to NodeBB v4.3 + New Features

QPSQL Driver Not found (Qt 5.5.1 & PostgreSQL 9.5)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 2 Posters 6.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MuzabM Offline
    MuzabM Offline
    Muzab
    wrote on last edited by
    #4

    Sorry did not check Qt is 32 bit and I installed the 64 bit versions of DB Servers.

    1 Reply Last reply
    0
    • MuzabM Offline
      MuzabM Offline
      Muzab
      wrote on last edited by Muzab
      #5

      Installed the 32bit-PostgresSQL. I still have the same problem. I am following an earlier postlink text to solve this. Hope it works!

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

        One of the important things is to modify your PATH environment variable in Qt Creator in order for your application to find the PostgreSQL DLLs and thus allow the plugin to be loaded.

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

        1 Reply Last reply
        0
        • MuzabM Offline
          MuzabM Offline
          Muzab
          wrote on last edited by
          #7

          @SGaist said:

          PATH environment variable in Qt Creator

          I added the paths:
          C:\Qt\5.6\mingw49_32\plugins\sqldrivers;C:\Qt\5.6\Src\qtbase\plugins\sqldrivers;C:\Qt\5.6\Src\qtbase\src\plugins\sqldrivers;
          to the PATH variable in the Build Environment. It remains unsaved as it shows itself up in Bold font.
          it seems quite basic here but got me stuck.

          PATH = C:\Qt\5.6\mingw49_32\plugins\sqldrivers;C:\Qt\5.6\Src\qtbase\plugins\sqldrivers;C:\Qt\5.6\Src\qtbase\src\plugins\sqldrivers; :${PATH}
          Something I miss here, as it won't append. Please help me out.

          1 Reply Last reply
          0
          • MuzabM Offline
            MuzabM Offline
            Muzab
            wrote on last edited by
            #8

            Got this Errror:

            Got keys from plugin meta data ("svg", "svgz", "svg.gz")
            QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Examples/Qt-5.6/qtbase/sql/build-sqlbrowser-Desktop_Qt_5_6_0_MinGW_32bit-Debug/debug/iconengines" ...
            QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/5.6/mingw49_32/plugins/accessible" ...
            QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Examples/Qt-5.6/qtbase/sql/build-sqlbrowser-Desktop_Qt_5_6_0_MinGW_32bit-Debug/debug/accessible" ...
            QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/5.6/mingw49_32/plugins/accessiblebridge" ...
            QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Examples/Qt-5.6/qtbase/sql/build-sqlbrowser-Desktop_Qt_5_6_0_MinGW_32bit-Debug/debug/accessiblebridge" ...
            loaded library "C:/Qt/5.6/mingw49_32/plugins/sqldrivers/qsqlpsqld.dll"
            QLibraryPrivate::loadPlugin failed on "C:/Qt/5.6/mingw49_32/plugins/sqldrivers/qsqlpsqld.dll" : "Cannot load library C:\Qt\5.6\mingw49_32\plugins\sqldrivers\qsqlpsqld.dll: The specified module could not be found."
            QSqlDatabase: QPSQL driver not loaded
            QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

            • Ran Dependency Walker on "qsqlpsqld.dll" and the dependencies are as follow:
              LIBSTDC++-6.DLL
              QTSCORED.DLL
              QTSSQLD.DLL
              LIBPQ.DLL

            • Have added to the PATH "C:/Qt/5.6/mingw49_32/plugins/sqldrivers/" "C:\Qt\5.6\mingw49_32\bin"

            • Have already copied "libpq.dll" in the "C:\Qt\5.6\mingw49_32\bin" folder along with "libeay32.dll", "libintl-8.dll", "libpq.dll" and "ssleay32.dll"

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

              You don't need to any Qt related path to PATH. By the way, are you doing it in the Build part ? That should go in the Run part.

              Also there's no need to copy libpq.dll around, just add the folder that contains it to PATH.

              One thing you can do to verify that everything is fine with that .DLL is to run Dependency Walker and add the path to the libqp.dll folder in the search path list. It should show you if there's something wrong with it.

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

              1 Reply Last reply
              0
              • MuzabM Offline
                MuzabM Offline
                Muzab
                wrote on last edited by
                #10

                When I go to the run part it shows that Base environment for this run configuration = the build environment.
                The path to "LIBPQ.DLL" already exists here.

                **add the path to the libqp.dll folder in the search path list
                **

                Can you elaborate this? If you say this is done in Dependency Walker then I can't find the search path list to add the path.
                I already ran Dependency Walker on "qsqlpsqld.dll" and found 4 dependencies.

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

                  Right, I forgot that by default the build environment is copied including your customizations.

                  In Dependency Walker, there's a menu (I don't remember its name right now) that allows you to customize the list of paths search for dependencies of what you are currently analyzing. There you can add the path to PostgreSQL .dll files.

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

                  1 Reply Last reply
                  0
                  • MuzabM Offline
                    MuzabM Offline
                    Muzab
                    wrote on last edited by
                    #12

                    There is something called as Module Search Order. I am not sure if this is the one you point to. Since I am not sure, I would like to try it later. Thank you so much for your response and help so far. Truly appreciate it!

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

                      Yes, that's that one.

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

                      1 Reply Last reply
                      0

                      • Login

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