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
    • Status: Open
    • P2: Important
    • Resolution: Unresolved
    • 2.8.0
    • None
    • 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

              mecfc Miguel Costa
              chrisaverage Krzysztof Kawa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes