Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved C1083: Cannot open include fhile: 'QtSql': No such file or directory

    General and Desktop
    4
    10
    1624
    Loading More Posts
    • 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.
    • JKyle145
      JKyle145 last edited by

      I just installed 5.7.0, created a Qt Widgets Application, added sql (QT += core gui sql) to the .pro file and added '#include <QtSql>' to the mainwindow.h file. No other changes made. When compiling with 'MSVC2013 64 ' in Debug mode I receive the error noted. When I change to release mode, the program compiles and runs. I manually ran the qmake file with the basic parameters noted in the documentation. No effect. Any ideas on how to resolve?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        How did you install Qt ?

        The include failure looks pretty strange. What if you include something like QSqlTableModel ?

        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 Reply Quote 0
        • JKyle145
          JKyle145 last edited by

          Qt installation was with the main Windows install program with binary code. Changing the include file produced the same error except for the file name. Thank you.

          1 Reply Last reply Reply Quote 0
          • NickV
            NickV last edited by

            In the pro file add:

            QT+= sql
            
            JKyle145 1 Reply Last reply Reply Quote 0
            • JKyle145
              JKyle145 @NickV last edited by

              @NickV As noted the sql was added in the .pro file.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Did you check your Qt installation folder content ?

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

                JKyle145 1 Reply Last reply Reply Quote 0
                • JKyle145
                  JKyle145 @SGaist last edited by

                  @SGaist The sub folders in the Qt 5.7 folder look normal. The appropriate bin folder has Qt5Sql.dll and Qt5Sqld.dll files. Anything else I should look for? During installation, I chose only 5.7 packages. Would older ones be helpful?

                  1 Reply Last reply Reply Quote 0
                  • Chris Kawa
                    Chris Kawa Moderators last edited by

                    Build -> Run qmake and build again. Always do that when you edit .pro file.

                    JKyle145 1 Reply Last reply Reply Quote 1
                    • JKyle145
                      JKyle145 @Chris Kawa last edited by

                      @Chris-Kawa That does seem to have resolved the issue. Thank you.

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        The good all classic qmake re-run… :D

                        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 Reply Quote 0
                        • First post
                          Last post