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. 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

              fabiankosmale Fabian Kosmale
              tguen tguen
              Votes:
              8 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes