Solved Error while compiling Qt app in Microsoft Visual Studio
-
I installed MVS 2019 community edition. I also installed the Qt:
Then I tested if Qt works properly by making a project in Qt creator. After compiling an empty window appears indicating proper working of Qt. Then, I tried to use Qt in MVS. I first installed Qt tools and registered one Qt version. I added qmake in C:\Qt\6.1.2\msvc2019_64\bin in the Qt tools.
Then I made a qt project in MVS:
and confirming the version I registered before:
However, after I compile the program, I get errors:
What is the origin of these errors?
-
Based on a Youtube comment this is the solution:
1- Right click on the project name and select properties.
2- Configuration properties -> General.
3- Change the "C++ Language standard" to "ISO C++17 standard".