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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.0
    • Build tools: moc
    • None
    • 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. repro_error.tar.gz
          4 kB
        2. fs_error.png
          fs_error.png
          13 kB
        3. fs_error.tar.gz
          1 kB

        Issue Links

          Activity

            People

              fabiankosmale Fabian Kosmale
              tguen tguen
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: