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. Keep getting C1083 errors in the project that has all the #includes
Qt 6.11 is out! See what's new in the release blog

Keep getting C1083 errors in the project that has all the #includes

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.4k 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.
  • N Offline
    N Offline
    newprint
    wrote on last edited by
    #1

    I am new QT user and following tutorials in " C++ GUI Programming with Qt 4, Second Edition" book, chapter 2 (here are files http://www.informit.com/store/c-plus-plus-gui-programming-with-qt4-9780132354165)

    While building the project(QT Creator on Win8) , I am getting errors:
    @
    c:\users\alexander\desktop\find\finddialog.h:4: error: C1083: Cannot open include file: 'QDialog': No such file or directory
    c:\Users\Alexander\Desktop\find\main.cpp:1: error: C1083: Cannot open include file: 'QApplication': No such file or directory
    c:\users\alexander\desktop\find\finddialog.h:4: error: C1083: Cannot open include file: 'QDialog': No such file or directory@

    QDialog,QApplication were included in my project.

    Thanks !

    1 Reply Last reply
    0
    • 8 Offline
      8 Offline
      8majkel8
      wrote on last edited by
      #2

      Verify your project file configuration. Especially QT variable - should contain core, gui and widgets if qt5.

      @
      QT += core gui

      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      @

      1 Reply Last reply
      0
      • N Offline
        N Offline
        newprint
        wrote on last edited by
        #3

        Thanks for reply, I have added two lines, but keep getting same errors.

        QT += core gui

        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

        TEMPLATE = app
        HEADERS = finddialog.h
        SOURCES = finddialog.cpp
        main.cpp

        maybe, it has to do with the fact, that project was imported and not created from scratch ??

        1 Reply Last reply
        0
        • 8 Offline
          8 Offline
          8majkel8
          wrote on last edited by
          #4

          bq. maybe, it has to do with the fact, that project was imported and not created from scratch ??

          if your project consists of only three files then it's better to create new gui project, copy the files into it and then add to project.

          bq. SOURCES = finddialog.cpp \ main.cpp

          @
          SOURCES = finddialog.cpp
          main.cpp
          @

          or

          @
          SOURCES = finddialog.cpp main.cpp
          @

          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