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. Deploy application in windows with driver of postgresql
Forum Updated to NodeBB v4.3 + New Features

Deploy application in windows with driver of postgresql

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 4 Posters 1.9k 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.
  • Christian EhrlicherC Online
    Christian EhrlicherC Online
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Use Dependency Walker or similar to find out what the Qt postgres plugin really needs.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

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

      Hi,

      Beside the good advice from @Christian-Ehrlicher, check also the PostgreSQL libraries dependencies.

      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
      1
      • M Offline
        M Offline
        MarlonBM
        wrote on last edited by
        #4

        It is possible that the qpsql library tells me that it depends on a libpq.dll that is not the one inside the application folder?

        Screenshot_1.png

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

          Maybe a question of the architecture of the dll you copied.

          By the way, unless you added the folder containing the .dll in the search path of Dependency Walker, it will not find it because the plugin is in a different folder.

          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
          3
          • M Offline
            M Offline
            MarlonBM
            wrote on last edited by
            #6

            Before to update this programn, its work Fine with dlls of postgresql for 32 bit. This change could be the problem when i try to compile my programn, but this time with 64 bit?

            jsulmJ 1 Reply Last reply
            0
            • M MarlonBM

              Before to update this programn, its work Fine with dlls of postgresql for 32 bit. This change could be the problem when i try to compile my programn, but this time with 64 bit?

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

              @MarlonBM You can't mix 32bit and 64bit in same application.

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

              1 Reply Last reply
              2
              • M Offline
                M Offline
                MarlonBM
                wrote on last edited by
                #8

                I get it.
                But the version of Qt 5.12.1 comes for 64 bit, and what it has done is compile everything to 64bit, with windeploy it takes all 64 bit dll.
                The application works for me, it starts, but the first thing I have is a login form, and when I try to use it, it gives me the driver not loaded error. That is why I think it is the postgres libraries that should be giving me problems.

                jsulmJ 1 Reply Last reply
                0
                • M MarlonBM

                  I get it.
                  But the version of Qt 5.12.1 comes for 64 bit, and what it has done is compile everything to 64bit, with windeploy it takes all 64 bit dll.
                  The application works for me, it starts, but the first thing I have is a login form, and when I try to use it, it gives me the driver not loaded error. That is why I think it is the postgres libraries that should be giving me problems.

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

                  @MarlonBM You need 64bit PostgreSQL dll.

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

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MarlonBM
                    wrote on last edited by
                    #10

                    on the pc that I have the database,
                    I have 2 versions of postgres installed, 9.2 of 32 bit, and 11 of 64 bit. I have stopped the postgresql service of the 32-bit one, in case they conflict. I have copied the dll that are in the bin folder of version 11 of 64 bit postgres, for my program folder and it still gives me the same error of
                    "Driver not load"

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

                      Again: are you sure that the correct dependencies are found ?

                      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
                      • M Offline
                        M Offline
                        MarlonBM
                        wrote on last edited by
                        #12

                        Hello,
                        I have solved with the dependency walker tool,
                        as advised by @Christian Ehrlicher and @SGaist.
                        It was not a problem of the postgres dll but it was necessary to install mvcredistx64.

                        1 Reply Last reply
                        2

                        • Login

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