Qt Creator cannot set up MSVC2019 compiler successfully.
-
I have installed VS2022 with vc143(MSVC2022() and vc142(MSVC2019).
I can normally work in VS using different MSVC versions.
Since I prefer Qt Creator's cmake project feature, I want to work in Qt Creator using vc142.
[P1] Compiler directoryThen I have set up vc142 compiler:
[P2] The C compiler
[P3] The C++ compiler
[P4] The kit
[P5]Use the MSVC2019 kit and configure projectThe problem is that I got vc143 but I configured vc142, just like the red underline in [P5] shows
[P5] If I set up an MSVC2017 kit that compiler does not exist, IDE will tip me that compiler is not exists.
[P6] Always got vc143I guess the reason is vcvarsal.bat, I try to run vcvarsall.bat by myself...
[P7] Run it in MinGW and PowerShell have no effect anyway
[P8] Run it in CMD all is well, then i can use vc142 in this cmd session normaly(such as build boost using vc142).I don't know why and I don't know how, but I hope somebody can fix this.
-
It is possible to achieve this, but setting the ABI is not enough.
You need to tell
vcvarsall.bat
the Visual C++ version you want. Just add-vcvars_ver=14.29
to the empty field just like in the picture below:You might want to restart Qt Creator so that the environment for
vcvarsall.bat
would be rescanned.See it in action below, with the expected results:
-
Your Problem is simple, all you have to do is installing microsoft visual studio 2019 with Visual Studio SDK and Qt will detect and setup compilers automatically.You do not need to setup by yourself. Moreover, all qt versions have specific versions of visual studio they can use. I am Using 2019 for MSCV2019 so maybe you can give it a go as well.
-
It is possible to achieve this, but setting the ABI is not enough.
You need to tell
vcvarsall.bat
the Visual C++ version you want. Just add-vcvars_ver=14.29
to the empty field just like in the picture below:You might want to restart Qt Creator so that the environment for
vcvarsall.bat
would be rescanned.See it in action below, with the expected results:
-
-
Yes, you're right. Thank you for your help.@cristian-adam
-
C cristian-adam referenced this topic on