QPSQL driver not loaded
-
Hi,
Do you have the postgresql dll in your PATH environment variable ?
-
wrote on 4 Oct 2013, 08:38 last edited by
Which library excatly? The qsqlpsql.dll?
-
No, the dll from your PostgreSQL installation (pq.dll IIRC)
-
wrote on 4 Oct 2013, 08:58 last edited by
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.
-
You can use Dependency Walker on your qsqlpsql.dll to check what dlls you need.
-
wrote on 4 Oct 2013, 09:23 last edited by
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.DLLBut where can I find all this dll?
-
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 -
wrote on 4 Oct 2013, 10:16 last edited by
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)
-
There are some more Dll's on which libpq depends. I guess these are
libssl32.dll
libeay32.dll
ssleay32.dll -
wrote on 16 Jan 2015, 18:28 last edited by SGaist 7 Nov 2015, 22:00
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:
- I downloaded the PostgreSQL from http://olex.openlogic.com/packages/postgresql/8.4.22-1
- I followed the instructions from this video https://www.youtube.com/watch?v=fBgJ9Azm_S0
- 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
- 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
-
wrote on 16 Jan 2015, 18:28 last edited by SGaist 7 Nov 2015, 22:00
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:
- I downloaded the PostgreSQL from http://olex.openlogic.com/packages/postgresql/8.4.22-1
- I followed the instructions from this video https://www.youtube.com/watch?v=fBgJ9Azm_S0
- 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
- 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
-
wrote on 11 Jul 2015, 10:32 last edited by
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. -
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.wrote on 23 May 2016, 07:56 last edited by@Fenigor This worked for me right away. Vow. Thanks a lot.