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. PostgreSQL client Windows Deployment Nightmare "Driver Not Loaded"
Forum Updated to NodeBB v4.3 + New Features

PostgreSQL client Windows Deployment Nightmare "Driver Not Loaded"

Scheduled Pinned Locked Moved Solved General and Desktop
32 Posts 6 Posters 10.0k Views 4 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.
  • SGaistS SGaist

    Hi,

    You wrote about both MSVC2013 and 2015 so are you trying to use a MSVC2013 build of PostgreSQL with a MSVC2015 build of Qt ? If so that won't work, Microsoft's compilers are not compatible one with the other when building C++ libraries. The current only exception is VS2017 which is backward compatible with VS2015. So beside architecture also check that part.

    Note that it looks like you are trying to distribute a debug build which might not be what you want.

    Z Offline
    Z Offline
    zeroptr
    wrote on last edited by
    #23

    Hello @SGaist

    I'm not trying to distribute debug version.. I can only have that output at Debug mode.. After making lots of trial and new test projects..

    I found that problem couse from a global QSqlDatabase variable.. That cost me a week...
    It tries to create it self before QCoreApplication so no plugins can be loaded..

    Thanks to Everyone...

    Linux Mint 20.04 64 Bit QT6.0.1

    mrjjM 1 Reply Last reply
    1
    • Z zeroptr

      Hello @SGaist

      I'm not trying to distribute debug version.. I can only have that output at Debug mode.. After making lots of trial and new test projects..

      I found that problem couse from a global QSqlDatabase variable.. That cost me a week...
      It tries to create it self before QCoreApplication so no plugins can be loaded..

      Thanks to Everyone...

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #24

      Oh
      That was a nasty one.
      There were no errors/warnings in Creator console?

      Z 1 Reply Last reply
      0
      • mrjjM mrjj

        Oh
        That was a nasty one.
        There were no errors/warnings in Creator console?

        Z Offline
        Z Offline
        zeroptr
        wrote on last edited by
        #25

        @mrjj unfortunately it took a week to figure out the problem...

        Linux Mint 20.04 64 Bit QT6.0.1

        mrjjM 1 Reply Last reply
        0
        • Z zeroptr

          @mrjj unfortunately it took a week to figure out the problem...

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #26

          @zeroptr
          Yep there is a many very good reasons most of us avoid globals at all costs.
          But normally there is a warning that object initialized before application running
          sort of msg.
          Update:
          Nope, did not say a thing.

          Normally u get
          alt text

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

            There's absolutely no need for a class member nor a global QSqlDatabase variable. It's already a sort of singleton that has all the interface needed to retrieve database information any time needed.

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

            Z 1 Reply Last reply
            1
            • mrjjM mrjj

              @zeroptr
              Yep there is a many very good reasons most of us avoid globals at all costs.
              But normally there is a warning that object initialized before application running
              sort of msg.
              Update:
              Nope, did not say a thing.

              Normally u get
              alt text

              Z Offline
              Z Offline
              zeroptr
              wrote on last edited by
              #28

              @mrjj unfortunately if I get this message before I can repair this in a day or two.. but mingw or MSVC doesn't produce any message like this..

              Linux Mint 20.04 64 Bit QT6.0.1

              mrjjM 1 Reply Last reply
              0
              • SGaistS SGaist

                There's absolutely no need for a class member nor a global QSqlDatabase variable. It's already a sort of singleton that has all the interface needed to retrieve database information any time needed.

                Z Offline
                Z Offline
                zeroptr
                wrote on last edited by
                #29

                @SGaist yes I unfortunately learned that on long way..

                Linux Mint 20.04 64 Bit QT6.0.1

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

                  To be fair, there's a warning in the detailed documentation of QSqlDatabase about not keeping QSqlDatabase variables around.

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

                  mrjjM 1 Reply Last reply
                  1
                  • Z zeroptr

                    @mrjj unfortunately if I get this message before I can repair this in a day or two.. but mingw or MSVC doesn't produce any message like this..

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #31

                    @zeroptr
                    Well it didn't say that for the QSqlDatabase .
                    Only the QWidget gave spank at once.
                    I guess its not illegal to have an instance of QSqlDatabase
                    before main but as you found out it can that try to use stuff
                    before its up and running.

                    But the good part is that we learned something. I didn't guess at such thing but next time i will ask.

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      To be fair, there's a warning in the detailed documentation of QSqlDatabase about not keeping QSqlDatabase variables around.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #32

                      @SGaist
                      Oh not as even as class member.

                      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