Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-932

Compiler flags for moc_* sources are not inherited from parent project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 2.7.2
    • None
    • Windows desktop
    • Windows

      After recently updating the Qt Visual Studio Tools extension to version 2.7.2, the compilation step of all of our Qt projects failed with the message #error: "Qt requires a C++17 compiler, and a suitable value for _cplusplus. On MSVC, you must pass the /Zc:cplusplus option to the compiler.". Only the moc* files generated by Qt are affected. Other files in the same projects compile without issue.

      Inspecting the command line output for these projects show that this flag is indeed no longer present for the affected files. We set this flag through some visual studio .props files, so that all of our projects inherit it. This has not caused us any issues, until now. 

      Reverting the extension back to version 2.7.1 solves our problems, for now.

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

            ali.demiralp Ali Can Demiralp (Inactive)
            rkoning Robbert Koning
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes