Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QPSQL driver not loaded
Forum Updated to NodeBB v4.3 + New Features

QPSQL driver not loaded

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mickey17
    wrote on last edited by
    #1

    Hi,
    I installed Qt using the install wizard in home folder. I installed libqt5sql5-psql and postgresql using:
    sudo apt-get install libqt5sql5-psql
    sudo apt-get install postgresql
    Now I try connect Qt to PostgreSql, so I follow by http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html but it gives me errors:
    @michal@mickey:~/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/psql$ qmake "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
    michal@mickey:~/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/psql$ make
    g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/include/postgresql -O2 -std=c++0x -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQ_USE_APPMENU -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++ -I. -I/usr/include/pgsql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtSql/5.0.2 -I/usr/include/qt5/QtSql/5.0.2/QtSql -I/usr/include/qt5/QtCore -I.moc/release-shared -o .obj/release-shared/qsql_psql.o ../../../sql/drivers/psql/qsql_psql.cpp
    ../../../sql/drivers/psql/qsql_psql.cpp:56:40: fatal error: QtSql/private/qsqlresult_p.h: No such file or directory
    compilation terminated.
    make: *** [.obj/release-shared/qsql_psql.o] Error 1
    @
    What can I do with this?
    Thanks for answer ;)

    1 Reply Last reply
    0
    • P Offline
      P Offline
      portoist
      wrote on last edited by
      #2

      It seems that you are trying to build postgre sql driver, but by installing libqt5sql5-psql you should already have this driver. What is output of:
      @
      sudo find / -name libqsqlpsql*
      @

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved