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

MOC fails silently on missing includes

XMLWordPrintable

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

      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?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes