Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Include issue for ui.h since qt 5.15.12
Qt 6.11 is out! See what's new in the release blog

Include issue for ui.h since qt 5.15.12

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 3 Posters 908 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.
  • L Offline
    L Offline
    lacuna
    wrote on last edited by
    #1

    Hi there,

    since I updated to Qt 5.15.12 I get in any of my projects
    a strange error message like this type:

    Member access into incomplete type 'Ui::MyApp' (fix available)
    myapp.h:76:7: forward declaration of 'Ui::MyApp'
    Include "build/release/tmp/ui_myApp.h" for symbol Ui::MyApp
    

    I thought Qt Creator and Qt takes care of including ui_*.h files.
    Does anybody has an idea how to fix this?

    thx in advance

    JonBJ 1 Reply Last reply
    0
    • L lacuna

      Hi there,

      since I updated to Qt 5.15.12 I get in any of my projects
      a strange error message like this type:

      Member access into incomplete type 'Ui::MyApp' (fix available)
      myapp.h:76:7: forward declaration of 'Ui::MyApp'
      Include "build/release/tmp/ui_myApp.h" for symbol Ui::MyApp
      

      I thought Qt Creator and Qt takes care of including ui_*.h files.
      Does anybody has an idea how to fix this?

      thx in advance

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @lacuna
      Make sure you have cleaned and rebuilt to create the ui_myApp.h file when uic is run on myApp.ui file.
      Your myApp.cpp should have #include "ui_myApp.h in it.

      Include "build/release/tmp/ui_myApp.h" for symbol Ui::MyApp

      The file should be generated into, and found in, build/release/ui_myApp.h. I don't know how/why you have a tmp subdirectory in there, and it looks like that is the problem.

      L 1 Reply Last reply
      0
      • JonBJ JonB

        @lacuna
        Make sure you have cleaned and rebuilt to create the ui_myApp.h file when uic is run on myApp.ui file.
        Your myApp.cpp should have #include "ui_myApp.h in it.

        Include "build/release/tmp/ui_myApp.h" for symbol Ui::MyApp

        The file should be generated into, and found in, build/release/ui_myApp.h. I don't know how/why you have a tmp subdirectory in there, and it looks like that is the problem.

        L Offline
        L Offline
        lacuna
        wrote on last edited by
        #3

        @JonB

        Dear Jon, thx for your valuable response. Let me answer your question about the tmp directory.

        We use a different structure for build directories, instead of shadow build structure.
        With "tmp" and build it worked fine the last 3 years and was easier to be cleared and maintained.

        CONFIG(debug, debug|release) {
                DESTDIR      = $$PWD/build/debug/
            } else {
                DESTDIR      = $$PWD/build/release/
            }
        
        ... some more stuff
        
        #Temporary build directory
        TMP_DIR      = $$DESTDIR/tmp
        OBJECTS_DIR  = $$DESTDIR/tmp
        MOC_DIR      = $$DESTDIR/tmp
        RCC_DIR      = $$DESTDIR/tmp
        UI_DIR       = $$DESTDIR/tmp
        ``
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Rather than hard coding paths within your sources, you should do out of source builds. This will make things even easier to clean.

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

          L 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Rather than hard coding paths within your sources, you should do out of source builds. This will make things even easier to clean.

            L Offline
            L Offline
            lacuna
            wrote on last edited by
            #5

            @SGaist I agree - but my co workers insist in their old way to do things ...

            JonBJ 1 Reply Last reply
            0
            • L lacuna

              @SGaist I agree - but my co workers insist in their old way to do things ...

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @lacuna
              I suggest you find which directory the ui_...h file is being regenerated into when the uic command is run. Then look at how your code is doing the include and what the include path is. Then work back from there to what is/is not going on, and compare to previous version.

              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