Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71641

MOC fails silently on missing includes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.9.5
    • Build tools: moc
    • None
    • Visual Studio 2015 & 2017. Windows 10 (x64).
    • Windows

    Description

      MOC seem to fail silently on missing #include headers. This causes sporadic problems with missing macro expansions in our SW that trigger hard-to-understand errors later in the build process.

      Reproducer project attached. The reproducer might appear artificial, but it's based on real-life problems where the missing header first appear after the MOC run, but before the C++ compiler run. This causes the build succeed, despite MOC not expanding macros found in the missing header.

       Can you please make MOC more strict, so that it fails immediately when headers are not found?

      Attachments

        Issue Links

          Activity

            People

              ogoffart Olivier Goffart (Woboq GmbH)
              forderud Fredrik Orderud
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: