0

My versions: Visual Studio Community 2022 and Qt 6.3.2.

When I compile my project, the error happens: 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 according to the tip and still it does not work.

Besides, the answer in How to fix Qt requires a C++17 compiler? does not work either.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
HenryHoo
  • 1
  • 2
  • As well as the `/Zc` flag, you also need to explicitly set the C++ standard for your project to C++17 or later. IIRC, the default for VS2022 is C++14. – Adrian Mole Jan 18 '23 at 15:50
  • I chose the C++ 17 also. But both of the adding /Zc:__cplusplus and the set of C++17 do not work. – HenryHoo Jan 18 '23 at 17:01

0 Answers0