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. Cannot install postgreSQL driver
Forum Updated to NodeBB v4.3 + New Features

Cannot install postgreSQL driver

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 4 Posters 10.0k 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.
  • P Offline
    P Offline
    paladinmain
    wrote on last edited by
    #3

    Copied from the kits "Desktop Qt %{Qt:Version} MSVC2015 64bit" so yea msvc it seems

    jsulmJ 1 Reply Last reply
    0
    • P paladinmain

      Copied from the kits "Desktop Qt %{Qt:Version} MSVC2015 64bit" so yea msvc it seems

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @paladinmain Did you install MSVC2015?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        paladinmain
        wrote on last edited by
        #5

        I have it installed, yes.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Hi and welcome to devnet,

          To add to @jsulm, did you install the C++ components when installing VS2015 ? They are not selected by default.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Stoyan
            wrote on last edited by Stoyan
            #7

            Generally, you don't have to compile drivers for PostgreSQL.
            There are steps to use PostgreSQL:

            1. Add to your *.pro file this line:
            QT += sql
            
            1. Copy to the folder with your application (exe) this folder:
            %QTDIR%\plugins\sqldrivers
            

            Especially files "qsqlpsql.dll" (for Release) and/or "qsqlpsqld.dll" (for Debug).
            3. Copy to the folder with your application (exe) this files from PostgreSQL folder:

            libeay32.dll
            libiconv-2.dll
            libintl-8.dll
            libpq.dll
            ssleay32.dll
            

            You can get them from zip archive of the binaries if you don't want to install PostgreSQL.
            Note that you will need files for the same system version like your Qt version.
            For example:
            If you use MinGW32 (witch is only 32-bit) or MSVC x32 you need these files from 32-bit version of PostgreSQL.
            If you use MSVC x64 you need these files from 64-bit version of PostgreSQL.

            1 Reply Last reply
            3
            • P Offline
              P Offline
              paladinmain
              wrote on last edited by
              #8

              on 2. , do you mean to copy the sqldrivers to the folder where i'm compiling my project or?

              S 1 Reply Last reply
              0
              • P paladinmain

                on 2. , do you mean to copy the sqldrivers to the folder where i'm compiling my project or?

                S Offline
                S Offline
                Stoyan
                wrote on last edited by
                #9

                @paladinmain
                Where your *.exe file will be. Something like this:

                .../ProjectRelease/project.exe
                .../ProjectRelease/sqldrivers/qsqlpsql.dll
                .../ProjectRelease/libpq.dll
                
                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  paladinmain
                  wrote on last edited by paladinmain
                  #10

                  Thanks for the quick replies.

                  I copied the dlls and the sqldrivers in the .pro folder and added the QT += sql in the .pro file. Did you mean to put them into the folder like that?

                  0_1499687136622_chess pro.jpg

                  S 1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    paladinmain
                    wrote on last edited by
                    #11

                    Just a small update.

                    I just gave up. Installed qt and postgresql on ubuntu and compiled the project with no problems. Guess I'll be finishing it on Ubuntu. Thanks for all the replies, guys.

                    1 Reply Last reply
                    0
                    • P paladinmain

                      Thanks for the quick replies.

                      I copied the dlls and the sqldrivers in the .pro folder and added the QT += sql in the .pro file. Did you mean to put them into the folder like that?

                      0_1499687136622_chess pro.jpg

                      S Offline
                      S Offline
                      Stoyan
                      wrote on last edited by
                      #12

                      @paladinmain
                      No. This is wrong folder.
                      Look one level up -> (for example) chess-game-Release\release
                      Or look from Qt Creator:
                      Projects -> Build Settings -> Build directory

                      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