Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Error while compiling Qt app in Microsoft Visual Studio



  • I installed MVS 2019 community edition. I also installed the Qt:
    1.png

    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:
    2.png
    and confirming the version I registered before:
    3.png
    However, after I compile the program, I get errors:
    4.png

    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".


Log in to reply