Reputation: 39
I'm stuck on this, when i compile a project in Visual Studio i have this error at the ouput, telling that:
on nmvc you must the /Zc:__cplusplus option to the compiler (compiling source file QtdesignerWidget.cpp)
I tried the solution to add /Zc:__cplusplus in the project properties -C++ / Command line / Additional options withou success And when i try to make a .pro file in QT VS tools it makes this error:
Warning : Cannot Find any Qt4 projects to export
Upvotes: 3
Views: 4908
Reputation: 31
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Command Line property page.
Add /Zc:__cplusplus or /Zc:__cplusplus- to the Additional options: pane.
The answer is taken from here: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170
Upvotes: 2
Reputation: 80
Are you sure your language standard is set to C++17 in the project settings?
Go to project properties --> General --> C++ Language Standard
In my case it was default set to C++14. This must be set to C++17.
Upvotes: 0
Reputation: 1
Same problem. Here are my platforms: Qt version: 6.2.0 Qt Visual Studio Tools version: 3.4 Compiler version: VS2019_64
Luckily, I also installed Qt5.14.2 on my computer. When I changed configurations to: Qt5.14.2 and VS2017_64. Problem solved. So I guess VS2019 or Qt VS tools3.4 doesn't work well with Qt6.2.0.
You can have a try.
Upvotes: 0