[SOLVED]QPSQL driver not loaded appears for Qt 5.3.0 only!
-
Hello,
After installing Qt 5.3.0 under Windows 7 x64 I experienced a strange issue (Qt 5.2.1 was working fine).
I always get this error message:
[code]QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Unable to connect![/code]
Whether I run my apps from Qt Creator or even deployed them as usual! The following list shows you that all the deployment files already exists while the app unable to find SQL plugin!... May I get a help from you?[code]D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug>dir /w /s
Volume in drive D is WORK
Volume Serial Number is 4585-4EFEDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug
[.] [..]
Enginio.dll Enginiod.dll
gpsvc.dll icudt52.dll
icuin52.dll icuuc52.dll
IEShims.dll libgcc_s_dw2-1.dll
libstdc++-6.dll libwinpthread-1.dll
main.o [platforms]
Qt5Bluetooth.dll Qt5Bluetoothd.dll
Qt5CLucene.dll Qt5CLucened.dll
Qt5Concurrent.dll Qt5Concurrentd.dll
Qt5Core.dll Qt5Cored.dll
Qt5Declarative.dll Qt5Declaratived.dll
Qt5Designer.dll Qt5DesignerComponents.dll
Qt5DesignerComponentsd.dll Qt5Designerd.dll
Qt5Gui.dll Qt5Guid.dll
Qt5Help.dll Qt5Helpd.dll
Qt5Multimedia.dll Qt5Multimediad.dll
Qt5MultimediaQuick_p.dll Qt5MultimediaQuick_pd.dll
Qt5MultimediaWidgets.dll Qt5MultimediaWidgetsd.dll
Qt5Network.dll Qt5Networkd.dll
Qt5Nfc.dll Qt5Nfcd.dll
Qt5OpenGL.dll Qt5OpenGLd.dll
Qt5Positioning.dll Qt5Positioningd.dll
Qt5PrintSupport.dll Qt5PrintSupportd.dll
Qt5Qml.dll Qt5Qmld.dll
Qt5Quick.dll Qt5Quickd.dll
Qt5QuickParticles.dll Qt5QuickParticlesd.dll
Qt5QuickTest.dll Qt5QuickTestd.dll
Qt5QuickWidgets.dll Qt5QuickWidgetsd.dll
Qt5Script.dll Qt5Scriptd.dll
Qt5ScriptTools.dll Qt5ScriptToolsd.dll
Qt5Sensors.dll Qt5Sensorsd.dll
Qt5SerialPort.dll Qt5SerialPortd.dll
Qt5Sql.dll Qt5Sqld.dll
Qt5Svg.dll Qt5Svgd.dll
Qt5Test.dll Qt5Testd.dll
Qt5WebKit.dll Qt5WebKitd.dll
Qt5WebKitWidgets.dll Qt5WebKitWidgetsd.dll
Qt5WebSockets.dll Qt5WebSocketsd.dll
Qt5Widgets.dll Qt5Widgetsd.dll
Qt5WinExtras.dll Qt5WinExtrasd.dll
Qt5Xml.dll Qt5Xmld.dll
Qt5XmlPatterns.dll Qt5XmlPatternsd.dll
SQLConnection.exe [sqldrivers]
sysntfy.dll
85 File(s) 754,574 bytesDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\platforms
[.] [..] qminimal.dll qminimald.dll
qoffscreen.dll qoffscreend.dll qwindows.dll qwindowsd.dll
6 File(s) 22,739,714 bytesDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\sqldrivers
[.] [..] qsqlite.dll qsqlited.dll
qsqlmysql.dll qsqlmysqld.dll qsqlodbc.dll qsqlodbcd.dll
qsqlpsql.dll qsqlpsqld.dll
8 File(s) 6,147,884 bytesTotal Files Listed: 99 File(s) 29,642,172 bytes 8 Dir(s) 390,405,840,896 bytes free
D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug>[/code]
PS
I copied SYSNTFY.DLL, IESHIMS.DLL and GPSVC.DLL because Dependency Walker mentioned them as dependent for my app. -
hi, you must locate libpq.dll in the case of windows, in linux you must be libpq.so
recalls the best option is to add the path or place inthe same folder where your executable or binary.
[quote author="mbnoimi" date="1403037245"]Hello,After installing Qt 5.3.0 under Windows 7 x64 I experienced a strange issue (Qt 5.2.1 was working fine).
I always get this error message:
[code]QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Unable to connect![/code]
Whether I run my apps from Qt Creator or even deployed them as usual! The following list shows you that all the deployment files already exists while the app unable to find SQL plugin!... May I get a help from you?[code]D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug>dir /w /s
Volume in drive D is WORK
Volume Serial Number is 4585-4EFEDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug
[.] [..]
Enginio.dll Enginiod.dll
gpsvc.dll icudt52.dll
icuin52.dll icuuc52.dll
IEShims.dll libgcc_s_dw2-1.dll
libstdc++-6.dll libwinpthread-1.dll
main.o [platforms]
Qt5Bluetooth.dll Qt5Bluetoothd.dll
Qt5CLucene.dll Qt5CLucened.dll
Qt5Concurrent.dll Qt5Concurrentd.dll
Qt5Core.dll Qt5Cored.dll
Qt5Declarative.dll Qt5Declaratived.dll
Qt5Designer.dll Qt5DesignerComponents.dll
Qt5DesignerComponentsd.dll Qt5Designerd.dll
Qt5Gui.dll Qt5Guid.dll
Qt5Help.dll Qt5Helpd.dll
Qt5Multimedia.dll Qt5Multimediad.dll
Qt5MultimediaQuick_p.dll Qt5MultimediaQuick_pd.dll
Qt5MultimediaWidgets.dll Qt5MultimediaWidgetsd.dll
Qt5Network.dll Qt5Networkd.dll
Qt5Nfc.dll Qt5Nfcd.dll
Qt5OpenGL.dll Qt5OpenGLd.dll
Qt5Positioning.dll Qt5Positioningd.dll
Qt5PrintSupport.dll Qt5PrintSupportd.dll
Qt5Qml.dll Qt5Qmld.dll
Qt5Quick.dll Qt5Quickd.dll
Qt5QuickParticles.dll Qt5QuickParticlesd.dll
Qt5QuickTest.dll Qt5QuickTestd.dll
Qt5QuickWidgets.dll Qt5QuickWidgetsd.dll
Qt5Script.dll Qt5Scriptd.dll
Qt5ScriptTools.dll Qt5ScriptToolsd.dll
Qt5Sensors.dll Qt5Sensorsd.dll
Qt5SerialPort.dll Qt5SerialPortd.dll
Qt5Sql.dll Qt5Sqld.dll
Qt5Svg.dll Qt5Svgd.dll
Qt5Test.dll Qt5Testd.dll
Qt5WebKit.dll Qt5WebKitd.dll
Qt5WebKitWidgets.dll Qt5WebKitWidgetsd.dll
Qt5WebSockets.dll Qt5WebSocketsd.dll
Qt5Widgets.dll Qt5Widgetsd.dll
Qt5WinExtras.dll Qt5WinExtrasd.dll
Qt5Xml.dll Qt5Xmld.dll
Qt5XmlPatterns.dll Qt5XmlPatternsd.dll
SQLConnection.exe [sqldrivers]
sysntfy.dll
85 File(s) 754,574 bytesDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\platforms
[.] [..] qminimal.dll qminimald.dll
qoffscreen.dll qoffscreend.dll qwindows.dll qwindowsd.dll
6 File(s) 22,739,714 bytesDirectory of D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\sqldrivers
[.] [..] qsqlite.dll qsqlited.dll
qsqlmysql.dll qsqlmysqld.dll qsqlodbc.dll qsqlodbcd.dll
qsqlpsql.dll qsqlpsqld.dll
8 File(s) 6,147,884 bytesTotal Files Listed: 99 File(s) 29,642,172 bytes 8 Dir(s) 390,405,840,896 bytes free
D:\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug>[/code]
PS
I copied SYSNTFY.DLL, IESHIMS.DLL and GPSVC.DLL because Dependency Walker mentioned them as dependent for my app.[/quote] -
[quote]hi, you must locate libpq.dll in the case of windows,[/quote]
I did but I still get same error message!
[quote]recalls the best option is to add the path or place inthe same folder where your executable or binary.[/quote]
I already did (notice my deployment)!
[code]D:\MBM-SOFT\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Deb
ug\debug>dir /w /s
Volume in drive D is WORK
Volume Serial Number is 4585-4EFEDirectory of D:\MBM-SOFT\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_M
inGW_32bit-Debug\debug[.] [..]
Enginio.dll Enginiod.dll
gpsvc.dll icudt52.dll
icuin52.dll icuuc52.dll
IEShims.dll libgcc_s_dw2-1.dll
libpq.dll libstdc++-6.dll
libwinpthread-1.dll main.o
[platforms] Qt5Bluetooth.dll
Qt5Bluetoothd.dll Qt5CLucene.dll
Qt5CLucened.dll Qt5Concurrent.dll
Qt5Concurrentd.dll Qt5Core.dll
Qt5Cored.dll Qt5Declarative.dll
Qt5Declaratived.dll Qt5Designer.dll
Qt5DesignerComponents.dll Qt5DesignerComponentsd.dll
Qt5Designerd.dll Qt5Gui.dll
Qt5Guid.dll Qt5Help.dll
Qt5Helpd.dll Qt5Multimedia.dll
Qt5Multimediad.dll Qt5MultimediaQuick_p.dll
Qt5MultimediaQuick_pd.dll Qt5MultimediaWidgets.dll
Qt5MultimediaWidgetsd.dll Qt5Network.dll
Qt5Networkd.dll Qt5Nfc.dll
Qt5Nfcd.dll Qt5OpenGL.dll
Qt5OpenGLd.dll Qt5Positioning.dll
Qt5Positioningd.dll Qt5PrintSupport.dll
Qt5PrintSupportd.dll Qt5Qml.dll
Qt5Qmld.dll Qt5Quick.dll
Qt5Quickd.dll Qt5QuickParticles.dll
Qt5QuickParticlesd.dll Qt5QuickTest.dll
Qt5QuickTestd.dll Qt5QuickWidgets.dll
Qt5QuickWidgetsd.dll Qt5Script.dll
Qt5Scriptd.dll Qt5ScriptTools.dll
Qt5ScriptToolsd.dll Qt5Sensors.dll
Qt5Sensorsd.dll Qt5SerialPort.dll
Qt5SerialPortd.dll Qt5Sql.dll
Qt5Sqld.dll Qt5Svg.dll
Qt5Svgd.dll Qt5Test.dll
Qt5Testd.dll Qt5WebKit.dll
Qt5WebKitd.dll Qt5WebKitWidgets.dll
Qt5WebKitWidgetsd.dll Qt5WebSockets.dll
Qt5WebSocketsd.dll Qt5Widgets.dll
Qt5Widgetsd.dll Qt5WinExtras.dll
Qt5WinExtrasd.dll Qt5Xml.dll
Qt5Xmld.dll Qt5XmlPatterns.dll
Qt5XmlPatternsd.dll SQLConnection.exe
[sqldrivers] sysntfy.dll
86 File(s) 754,574 bytesDirectory of D:\MBM-SOFT\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_M
inGW_32bit-Debug\debug\platforms[.] [..] qminimal.dll qminimald.dll
qoffscreen.dll qoffscreend.dll qwindows.dll qwindowsd.dll
6 File(s) 22,739,714 bytesDirectory of D:\MBM-SOFT\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_M
inGW_32bit-Debug\debug\sqldrivers[.] [..] qsqlite.dll qsqlited.dll
qsqlmysql.dll qsqlmysqld.dll qsqlodbc.dll qsqlodbcd.dll
qsqlpsql.dll qsqlpsqld.dll
8 File(s) 6,147,884 bytesTotal Files Listed: 100 File(s) 29,642,172 bytes 8 Dir(s) 390,405,840,896 bytes free
D:\MBM-SOFT\Snippets\C++ Qt\build-SQLConnection-Desktop_Qt_5_3_0_MinGW_32bit-Deb
ug\debug>[/code] -
Where did you get the libpq from? Can it be that the lib is x86. I see you are referring to the case of a x64 app