"QPSQL driver is not connected" on another computer

  • I compiled release version of program which works with postgresql using QPSQL driver, i added needed dlls, QPSQL plugin, libpq.dll and other dlls from postgresql\bin. After that .exe has started, everything was ok. but when i tried to start program on other machine error has occured and it do not see QPSQL driver. What could be the problem? Maybe i need to install postgres on other machine? but it would be strange...

  • Qt Champions 2017

    Check on "other pc" with
    if it miss some DLL.

  • @mrjj , i have already done that, nothing interesting. but strange, that if i delete some needed dll from directory, it also dont show that i need to add it. Rather it refers to libraries specifically for Postgres. For example, if i delete QtCore.dll it show that, but if i delete libpq.dll it shows nothing

  • @mrjj thats all it shows if i delete all postgres dll

  • Qt Champions 2017

    ok. That's the normal way to find missing stuff but it sounds something else.
    Some of the DLLS are not directly loaded by the OS and it will not tell you directly
    as it does with say Qt Dlls.
    App cannot start as XX is missing. For SQL drivers it wont prevent app from starting.

    Did u also try on the QPSQL plugin and files ?

  • @mrjj tried dpwalker on postgres dlls and qpsql. qpsql needs:
    But its probably okay because qpsql situated in \plugins and dlls that he asks in general directory ( or its not okay?)

    What about postgres dlls, they are need:

  • Lifetime Qt Champion


    Something's wrong here. You seem to have dependencies on both MinGW and MSVC .dlls. You can't mix them.

  • @bronstein87
    Also have a look here: http://doc.qt.io/qt-5/windows-deployment.html

    I always use the windeployqt tool when deploying windows applications.

    1. In the command prompt, call qtenv2.bat from $QTDIR/bin
    2. Then goto your application directory and call: windeployqt

    Then all needed .dlls of Qt are added to the application directory (except the dll of your compiler).

  • libpq needs vcredist_x86 2013. so, after i installed it , everything became ok

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.