Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. sqldrivers: PostgreSQL not found (Win10, Qt5.12.3, MSVC2017, Postgres 9.6.7)
Forum Updated to NodeBB v4.3 + New Features

sqldrivers: PostgreSQL not found (Win10, Qt5.12.3, MSVC2017, Postgres 9.6.7)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 242 Views
  • 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.
  • Z Offline
    Z Offline
    ZiLoX IT
    wrote on last edited by
    #1

    In regards to Re: sqldrivers: PostgreSQL not found (Win10 i tried the same things:

    1. qmake -- PSQL_INCDIR=C:/postgresql-9.6.7/include PSQL_LIBDIR=C:/postgresql-9.6.7/lib/ms (also without ms as i don't have that path structure) as told in the documentation (https://doc.qt.io/qt-5.12/sql-driver.html#qpsql)
    2. qmake "INCLUDEPATH+=C:/postgresql-9.6.7/include" "LIBS+=C:/postgresql-9.6.7/lib/libpq.lib" sqldrivers.pro
    3. Adding the postgres bin and lib dir to my path variable

    Can someone give me any pointers how to get postgres detected?

    Thank you very much.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZiLoX IT
      wrote on last edited by
      #2

      It seems i do already have the drivers shipped with the binary release of QT, as i found them in /plugins/sqldrivers:
      qsqlite.dll
      qsqlited.dll
      qsqlmysql.dll
      qsqlmysqld.dll
      qsqlodbc.dll
      qsqlodbcd.dll
      qsqlpsql.dll
      qsqlpsqld.dll

      Even as the documentation tells me otherwise:

      "Due to the practicalities of dealing with external dependencies, only the SQLite3 plugin is shipped with binary builds of Qt. To be able to add additional drivers to the Qt installation without re-building all of Qt, it is possible to configure and build the qtbase/src/plugins/sqldrivers directory outside of a full Qt build directory. Note that it is not possible to configure each driver separately, only all of them at once. Drivers can be built separately, though. If the Qt build is configured with -prefix, it is necessary to install the plugins after building them, too. For example:"

      So i don't need to build them anymore. Even if the problem itself is not solved (the same with the inital thread). Maybe i should not read the documentation first ;)

      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