Unsolved Postgresql driver is not found
-
Re: POSTGRES QPSQL not loading
Hello!
I have old problem with new soft. Got a message "Cannot load library C:\Qt\5.15.2\mingw81_64\plugins\sqldrivers\qsqlpsql.dll"
on Win 10 Pro x64 and Postgresql 13 x64. The path is valid.
I've smoked all web sources about this problem, used all advices but nothing changed. Is there any solution? -
@alxdef
Start with checking with a suitable Dependency Walker. Otherwise what didn't work in the proposals in the thread you reference? -
Here DW output:
But DW fault with this:
- I tried to add paths to Postgres "bin" and "lib" folders - no way.
- Copy DLLs to different folders: "build", "plugins\build" and other variations - no luck.
- I didn't build database libraries myself.
-
Hi and welcome to devnet,
On Qt Creator, add the QT_DEBUG_PLUGINS environment variable set to 1 in the Run part of the project panel. You'll have more information about what is going wrong.
-
@SGaist
Hi there!
I've already done this. The message I got is directly from application output. -
In the list of plugins information dumped in your application, you should have why the plugin failed to load. You did not show that in what you posted.
-
@SGaist
Here the supplement message to my first one: "QLibraryPrivate::loadPlugin failed on "C:/Qt/5.15.2/mingw81_64/plugins/sqldrivers/qsqlpsql.dll"" -
Can you should the complete output of your application ?
-
@SGaist
Here the part of application output about DLL load failure:Got keys from plugin meta data ("QPSQL7", "QPSQL") QFactoryLoader :: QFactoryLoader () checking directory path "…/ build-MCS-Desktop_Qt_5_15_2_MinGW_64_bit-Debug / Shell / debug / sqldrivers" … Cannot load library C: \ Qt \ 5.15.2 \ mingw81_64 \ plugins \ sqldrivers \ qsqlpsql.dll: The specified module could not be found. QLibraryPrivate :: loadPlugin failed on "C:/Qt/5.15.2/mingw81_64/plugins/sqldrivers/qsqlpsql.dll": "Cannot load library C: \\ Qt \\ 5.15.2 \\ mingw81_64 \\ plugins \\ sqldrivers \\ qsqlpsql.dll: The specified module could not be found. " QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
Tell me what additional information is needed?
-
Just remembered something, check that you have also copied the dependencies of the PostgreSQL .dll.
-
@SGaist
Am I on the right way? Which of them should be added in project executable folder?
-
The OpenSSL related
-
-
Then run Dependency Walker on these.
The next likely candidate is the VC runtime dll. -
@SGaist
I think that library is not in business. -
I meant that you should run Dependency Walker on the OpenSSL dlls and that it would have likely been the VC runtime missing.
-
It looks like infinite loop…
-
Did you copy the VC runtime in the same folder as the OpenSSL library ?
-
@alxdef Your first screenshot tells you that libstdc++-6.dll is missing.
-
@Christian-Ehrlicher said in Postgresql driver is not found:
@alxdef Your first screenshot tells you that libstdc++-6.dll is missing.
Arf ! I missed that one. Good catch :-)