Postgresql plugin
-
I have qt installed on osx and I have postgresql installed. Unfortunately, when trying to run executable, I get the following error:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBCIt seems like the qpsql plugin for qt is not installed or available.
$ qmake -query | grep plugins
QT_INSTALL_PLUGINS:/usr/local/Cellar/qt/4.8.3/plugins
cd /usr/local/Cellar/qt/4.8.3/plugins/sqldrivers
$ ls
libqsqlite.dylib libqsqlodbc.dylib libqsqlpsql.dylibHow do I get the psql plugin installed?
-
Hi,
What does otool -L libqsqlpsql.dylib return ?
-
It returns the following:
$ otool -L libqsqlpsql.dylib
libqsqlpsql.dylib:
libqsqlpsql.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.3.0)
/usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
/usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0) -
Looks right, but one thing that I find strange is that it's not listed in the available plugins.
Can you do the same on the other two plugins ?
-
@SGaist, this is the output for the other two plugins:
$ otool -L libqsqlite.dylib
libqsqlite.dylib:
libqsqlite.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
/usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)otool -L libqsqlodbc.dylib
libqsqlodbc.dylib:
libqsqlodbc.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.18.0)
/usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
/usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0) -
Ok, still looking good.
What does lastError return ?