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. moc: standard input:0: Note: No relevant classes found. No output generated.
Qt 6.11 is out! See what's new in the release blog

moc: standard input:0: Note: No relevant classes found. No output generated.

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 888 Views 2 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.
  • V Offline
    V Offline
    Vlad48
    wrote on last edited by
    #1

    I have project on qt 5.15.2(Community).
    This project was build without issues, but after moving one to different directory no moc_* files are creating.
    I tested on three different PC, on twos project was build, but on the third I can't.
    How this issue can be fixed?
    #moc

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      When moving the project, make sure to clean up any build artifacts:

      • .pro.user files
      • .qmake.stash
      • Makefile
      • etc.

      (Z(:^

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vlad48
        wrote on last edited by
        #3

        Sure I made these many times without success.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Are you sure it is the same code? Same Qt version? Does the class moc is complaining about have Q_OBJECT macro in it?

          (Z(:^

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vlad48
            wrote on last edited by
            #5

            No complaining about Q_OBJECT. The version is the same, all project files were copied to new folder. Moreover, in the old place on the same PC project was compiled fine using the same QT.
            I work on Windows10x64, MinGW 8.1-x64.

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Then I don't know what's wrong. Probably some error by moving the code, or misconfigured Qt, it's hard to say :/

              (Z(:^

              1 Reply Last reply
              0
              • KH-219DesignK Offline
                KH-219DesignK Offline
                KH-219Design
                wrote on last edited by
                #7

                My first instinct was to scrutinize the main of moc itself, but I'm not seeing too many clues:

                https://github.com/qt/qtbase/blob/d32f7dde257f6d/src/tools/moc/main.cpp#L573

                My other thought is the infamous "MAX_PATH" limit of 260 char on windows: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

                Over the years, I have ended up pinning a handful of bizarre and silent failures on the MAX_PATH issue. This should be considered as a candidate diagnosis if the longest path in the project repository reaches 260 char, but should also be considered even if the project paths (from project root) are themselves short, but the absolute path where the project is checked out (or where the build outputs are placed) consists of a long path.

                www.219design.com
                Software | Electrical | Mechanical | Product Design

                1 Reply Last reply
                1

                • Login

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