QPSQL driver not loaded (i know, it`s old theme but idk what to do)
-
I have this old problem with driver not loaded error, I have followed some guides such as distributing DLL beside my application exe, setting path to DLLs and so on. Please help me with this, I`ve spent entire day trying to fix it, but nothing works and I do not know what to do. Here some screenshots, I hope they will help. Currently using pg 14 and qt 5.5 MiniGW 4.9.2
-
I have this old problem with driver not loaded error, I have followed some guides such as distributing DLL beside my application exe, setting path to DLLs and so on. Please help me with this, I`ve spent entire day trying to fix it, but nothing works and I do not know what to do. Here some screenshots, I hope they will help. Currently using pg 14 and qt 5.5 MiniGW 4.9.2
@protos
Start by setting environment variableQT_DEBUG_PLUGINS=1
when you run your application. Look at the disgnostic output you will get, especially the end of it where it will tell you why theQPSQL
driver could not be loaded.I have followed some guides such as distributing DLL beside my application exe, setting path to DLLs and so on.
You are supposed to use a tool like
windeployqt
to distribute/deploy your application. -
What Postgres DLLs did you include? I would get it working by first just adding the bin folder of your Postgres installation to your PATH environment (and set QT_DEBUG_PLUGINS=1 as @JonB wrote). You can run the Windows Dependency Walker on the libpq.dll file to find out what DLLs in the Postgres bin folder that it needs and then use that list of DLLs when you want to deploy your application.