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. NO QSqlDatabase drivers in Release

NO QSqlDatabase drivers in Release

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 545 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.
  • T Offline
    T Offline
    TheEnigmist
    wrote on last edited by TheEnigmist
    #1

    I'm working with Qt 5.12.3 in Visual Studio 2017 64bit.
    I'm having a strange error. A simple output:
    qDebug << QSqlDatabase::drivers();
    In Debug mode it prints:
    QSLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
    If I run it in Release (CTRL+F5) it prints an empty list ().
    I checked in Project Linker Input and Qt5Sql.lib is setted, so why I get an empy list?

    EDIT: I just tested that code in QT Creator, Debug and Release show the same list, there is something wrong with my VS project

    aha_1980A 1 Reply Last reply
    1
    • T TheEnigmist

      I'm working with Qt 5.12.3 in Visual Studio 2017 64bit.
      I'm having a strange error. A simple output:
      qDebug << QSqlDatabase::drivers();
      In Debug mode it prints:
      QSLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
      If I run it in Release (CTRL+F5) it prints an empty list ().
      I checked in Project Linker Input and Qt5Sql.lib is setted, so why I get an empy list?

      EDIT: I just tested that code in QT Creator, Debug and Release show the same list, there is something wrong with my VS project

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @TheEnigmist probably the needed DLLs cannot be found on runtime, or wrong (incompatible) versions are found and cannot be used.

      Qt has to stay free or it will die.

      T 1 Reply Last reply
      3
      • aha_1980A aha_1980

        @TheEnigmist probably the needed DLLs cannot be found on runtime, or wrong (incompatible) versions are found and cannot be used.

        T Offline
        T Offline
        TheEnigmist
        wrote on last edited by
        #3

        @aha_1980
        I checked QApplication::libraryPaths() and added qt sql dlls there, but still it print empty list. But only in release, in debug it work like a charm

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

          Hi,

          The plugins have a hierarchy to follow. You can see it in your Qt installation. You can also use windeployqt to see which one goes where for your application.

          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
          2
          • T Offline
            T Offline
            TheEnigmist
            wrote on last edited by
            #5

            Seems that "Qt Project Settings" hasn't been edited correctly, I checked and unchecked SQL and now it works... weird...

            1 Reply Last reply
            1

            • Login

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