Qt Forum

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

    Solved strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...

    Mobile and Embedded
    4
    8
    14868
    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.
    • A
      aplastiras last edited by

      Hello to all,

      I am cross compiling for an embedded development board and I have some strange issues with qt creator. qtbase was compiled successfully for the target board.

      When I create a new project choosing the board that I want to build for, either a simple Console application or a QWidget application, from the first time that I configure the project, some issues appear in qt 'Issues' tab. Those issues concern the main types of like qt.

      For console

      0_1558371586873_20b97a24-50fc-481d-848c-c098dafb8134-image.png

      main.cpp:7: error: unknown type name 'QCoreApplication'

      For QWidget

      0_1558371651060_88b4daa5-2548-40a5-8b70-80b689d582c1-image.png

      main.cpp:6: error: variable has incomplete type 'QApplication'
      qwindowdefs.h:81: forward declaration of 'QApplication'
      main.cpp:7: error: unknown type name 'MainWindow'

      The most strange thing is that the console program compiles and runs successfully remotely on the board, which gives me the indication that

      Does anybody has any experience which any similar issue?

      Thank you in advance
      aplastiras

      aha_1980 1 Reply Last reply Reply Quote 0
      • aha_1980
        aha_1980 Lifetime Qt Champion @aplastiras last edited by

        Hi @aplastiras,

        these errors come from Creators Clang Code Model and are false positives. Such errors exists when Clang cannot parse a header file (for variouse reasons). I have them too on my ARM cross toolchain, but I didn't have the time to fully investigate the problem so far.

        You can either try that, or simply disable Clang in Help > About Plugins > Clang Code Model to fall back to the Classic Code Model.

        Regards

        Qt has to stay free or it will die.

        A 1 Reply Last reply Reply Quote 5
        • A
          aplastiras last edited by

          Thanks for your instant response

          After that every error disappeared.

          This solved the issues... thank you very much indeed.

          aha_1980 1 Reply Last reply Reply Quote 1
          • aha_1980
            aha_1980 Lifetime Qt Champion @aplastiras last edited by

            @aplastiras Ok, then please mark this topic as SOLVED too. Thanks!

            Qt has to stay free or it will die.

            A 1 Reply Last reply Reply Quote 0
            • A
              aplastiras @aha_1980 last edited by SGaist

              @aha_1980 as I have no experience, I can say that I did mark the topic as SOLVED but it didn't

              now the selection MARK AS SOLVED does not exist any more.

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

                Hi,

                @aplastiras said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:

                @aha_1980 as I have no experience, I can say that I did mark the topic as SOLVED but it didn't

                now the selection MARK AS SOLVED does not exist any more.

                It's in the "Topic Tools" button.

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

                A 1 Reply Last reply Reply Quote 1
                • A
                  aplastiras @SGaist last edited by

                  @SGaist said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:

                  Hi,

                  @aplastiras said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:

                  @aha_1980 as I have no experience, I can say that I did mark the topic as SOLVED but it didn't

                  now the selection MARK AS SOLVED does not exist any more.

                  It's in the "Topic Tools" button.

                  done... thank you

                  1 Reply Last reply Reply Quote 1
                  • A
                    Alam2003 @aha_1980 last edited by

                    @aha_1980 mine is still error, is there any other way?

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post