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

additional compiler options are not appended when compiling qtvars_plugin_import.cpp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 2.8.0
    • General
    • None
    • Visual Studio 2022 version 17.0.2
      Qt Visual Studio Tools 2.8.0
      Qt 6.2.2
    • Windows

    Description

      Steps to reproduce:

      Create new console project using the wizard.
      Change C++ Language Standard to ISO C++17 in project properties.
      Add /Zc:__cplusplus in Additional Options of the project properties.
      Compile.

      I get an error on compilation of `qtvars_plugin_import.cpp`:

      fatal error C1189: #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."
      

      I tried adding other stuff to additional options and then I've enabled verbose output of msbuild. I can see those options correctly passed to compilation of all source files except `qtvars_plugin_import.cpp`. It gets none of them. It's a generated file and I don't see any way to pass those options to it.

      Attachments

        Issue Links

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

          Activity

            People

              ali.demiralp Ali Can Demiralp
              chrisaverage Krzysztof Kawa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes