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

Qmake fails to generate moc file when using std::filesystem library

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.12.0
    • Fix Version/s: None
    • Component/s: Build tools: moc
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      When using #include <filesystem> before certain other header files, qmake produces the error:

      Parse error at "std"
      File not found: usr/include/c++/8.2.1/bits/fs_fwd.

      In the attached example, moving either of the other includes in window.hpp above <filesystem> will prevent the error. I've had this issue a few times, and it seems to always be in a header associated with a .ui file.

        Attachments

        1. fs_error.png
          fs_error.png
          13 kB
        2. fs_error.tar.gz
          1 kB
        3. repro_error.tar.gz
          4 kB

          Issue Links

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

            Activity

              People

              Assignee:
              fabiankosmale Fabian Kosmale
              Reporter:
              tguen tguen
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes