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 loaded
Forum Update on Monday, May 27th 2025

QPSQL driver not loaded

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 6 Posters 22.5k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 4 Oct 2013, 08:27 last edited by
    #2

    Hi,

    Do you have the postgresql dll in your PATH environment variable ?

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

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Vinorcola
      wrote on 4 Oct 2013, 08:38 last edited by
      #3

      Which library excatly? The qsqlpsql.dll?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 4 Oct 2013, 08:51 last edited by
        #4

        No, the dll from your PostgreSQL installation (pq.dll IIRC)

        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
        • V Offline
          V Offline
          Vinorcola
          wrote on 4 Oct 2013, 08:58 last edited by
          #5

          I don't find any dll of this kind. I tried to copy evry dll in the postgreSQL folder into my application folder. But it didn't work neither.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Oct 2013, 09:17 last edited by
            #6

            You can use Dependency Walker on your qsqlpsql.dll to check what dlls you need.

            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
            • V Offline
              V Offline
              Vinorcola
              wrote on 4 Oct 2013, 09:23 last edited by
              #7

              I have got the message:
              Error: At least one required implicit or forwarded dependency was not found.
              Warning: At least one delay-load dependency module was not found.
              Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

              There is few missing dll:
              LIBPQ.DLL
              API-MS-WIN-CORE-COM-L1-1-0.DLL
              API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
              API-MS-WIN-CORE-WINRT-L1-1-0.DLL
              API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
              API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
              API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
              DCOMP.DLL
              IESHIMS.DLL

              But where can I find all this dll?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 4 Oct 2013, 09:39 last edited by
                #8

                You can safely ignore DCOMP and IESHIMS.
                The API* should also not be of concern.

                So you need to have LIBPQ.dll in your PATH.

                What you can do is to go in the Projects pane of QtCreator, choose Run for your Kit and edit the PATH variable in "Run Environment", add the complete path to where libpq.dll can be located in front of the other paths (don't forget the semi-colon at the end of your path)
                Then you should be good to go

                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
                • V Offline
                  V Offline
                  Vinorcola
                  wrote on 4 Oct 2013, 10:16 last edited by
                  #9

                  I add the "C:\Program Files\PostgreSQL\9.3\bin" directory into the Windows PATH environment variable (and restart the computer) but it doesn't work. I still have the message "Driver not loaded".

                  I check back with depends.exe, and LIBPQ.DLL is not missing anymore.
                  But it display me the warning dialog saying:

                  Errors were detected when processing "c:\qt\mingw48_32\plugins\sqldrivers\QSQLPSQL.DLL". See the log wondow for details.

                  I still have the missing dependancy as before (except for LIBPQ.DLL)

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    p3c0
                    Moderators
                    wrote on 4 Oct 2013, 10:55 last edited by
                    #10

                    There are some more Dll's on which libpq depends. I guess these are
                    libssl32.dll
                    libeay32.dll
                    ssleay32.dll

                    157

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      batman.890825
                      wrote on 16 Jan 2015, 18:28 last edited by SGaist 7 Nov 2015, 22:00
                      #11

                      I had the same problem but I just found the solution.
                      First I'm putting my environment conditions:

                      • Windows 8.1 Enterprise
                      • Qt 5.4
                      • PostgreSQL 8.4.22

                      Here is what I did:

                      1. I downloaded the PostgreSQL from http://olex.openlogic.com/packages/postgresql/8.4.22-1
                      2. I followed the instructions from this video https://www.youtube.com/watch?v=fBgJ9Azm_S0
                      3. I used the 2nd method, which is creating the dll by myself but in my case I didn't had to add the DEFINES += HAVE_STRUCT_TIMESPEC. It seems to me that's for the PostgreSQL 9.X
                      4. After I moved the new dlls I still had the same problem, but when read this post I put in the PATH var this two dir "C:\PostgreSQL\8.4\bin; C:\Qt\Qt5.4.0\5.4\mingw491_32\bin" and reboot it and voila problem solved

                      I hope this will also help you

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        batman.890825
                        wrote on 16 Jan 2015, 18:28 last edited by SGaist 7 Nov 2015, 22:00
                        #12

                        I had the same problem but I just found the solution.
                        First I'm putting my environment conditions:

                        • Windows 8.1 Enterprise
                        • Qt 5.4
                        • PostgreSQL 8.4.22

                        Here is what I did:

                        1. I downloaded the PostgreSQL from http://olex.openlogic.com/packages/postgresql/8.4.22-1
                        2. I followed the instructions from this video https://www.youtube.com/watch?v=fBgJ9Azm_S0
                        3. I used the 2nd method, which is creating the dll by myself but in my case I didn't had to add the DEFINES += HAVE_STRUCT_TIMESPEC. It seems to me that's for the PostgreSQL 9.X
                        4. After I moved the new dlls I still had the same problem, but when read this post I put in the PATH var this two dir "C:\PostgreSQL\8.4\bin; C:\Qt\Qt5.4.0\5.4\mingw491_32\bin" and reboot it and voila problem solved

                        I hope this will also help you

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          Fenigor
                          wrote on 11 Jul 2015, 10:32 last edited by
                          #13

                          Hi i just wanted to post an answer that I found that worked for me so that people in the future don't have to deal as much on it as me on Windows,
                          With Qt Creator version 5,4, Compiler: MinGW 4.9.1 32bits and Database: PostgreSQL 9.4 on Windows 8.1 32bit and Windows 7 32bit.
                          Just copy "libeay32.dll" , "intl.dll" , "libpq.dll" , "ssleay32.dll"(if any of them are missing, add them) from the PostgreSQL's bin folder to Qt's bin (for me it looks like this: Qt\5.4\mingw491_32\bin).
                          Best of luck.

                          Nikhil NavareN 1 Reply Last reply 23 May 2016, 07:56
                          2
                          • F Fenigor
                            11 Jul 2015, 10:32

                            Hi i just wanted to post an answer that I found that worked for me so that people in the future don't have to deal as much on it as me on Windows,
                            With Qt Creator version 5,4, Compiler: MinGW 4.9.1 32bits and Database: PostgreSQL 9.4 on Windows 8.1 32bit and Windows 7 32bit.
                            Just copy "libeay32.dll" , "intl.dll" , "libpq.dll" , "ssleay32.dll"(if any of them are missing, add them) from the PostgreSQL's bin folder to Qt's bin (for me it looks like this: Qt\5.4\mingw491_32\bin).
                            Best of luck.

                            Nikhil NavareN Offline
                            Nikhil NavareN Offline
                            Nikhil Navare
                            wrote on 23 May 2016, 07:56 last edited by
                            #14

                            @Fenigor This worked for me right away. Vow. Thanks a lot.

                            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