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. C1083: Cannot open include fhile: 'QtSql': No such file or directory

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 2.2k Views
  • 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.
  • JKyle145J Offline
    JKyle145J Offline
    JKyle145
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • JKyle145J Offline
        JKyle145J Offline
        JKyle145
        wrote on last edited by
        #3

        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
        0
        • NickVN Offline
          NickVN Offline
          NickV
          wrote on last edited by
          #4

          In the pro file add:

          QT+= sql
          
          JKyle145J 1 Reply Last reply
          0
          • NickVN NickV

            In the pro file add:

            QT+= sql
            
            JKyle145J Offline
            JKyle145J Offline
            JKyle145
            wrote on last edited by
            #5

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

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

              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

              JKyle145J 1 Reply Last reply
              0
              • SGaistS SGaist

                Did you check your Qt installation folder content ?

                JKyle145J Offline
                JKyle145J Offline
                JKyle145
                wrote on last edited by
                #7

                @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
                0
                • Chris KawaC Offline
                  Chris KawaC Offline
                  Chris Kawa
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  JKyle145J 1 Reply Last reply
                  1
                  • Chris KawaC Chris Kawa

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

                    JKyle145J Offline
                    JKyle145J Offline
                    JKyle145
                    wrote on last edited by
                    #9

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

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

                      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
                      0

                      • Login

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