Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 4.9.1
-
None
Description
Since MSVC 2017, it is possible to install older toolchains side-by-side with the current toolchain when installing Visual studio.
See the blog post introducing this here:
https://devblogs.microsoft.com/cppblog/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/
I now installed MSVC 2019 on a fresh PC and selected the components for the v140(MSVC2015) and v141(MSVC2017) toolchains for this installation.
In this setup, Qt creator detects two sets of Compilers: "Microsoft Visual C++ Compiler 14.0(...)" and "Microsoft Visual C++ Compiler 16.1.29001.49(...)". Version 15.9 (which would be Visual Studio 2017, aka MSVC++ 14.16 or _MSC_VER == 1916) is not being detected.
I can however start this toolchain from Command line as described [on this page|https://docs.microsoft.com/de-de/cpp/build/building-on-the-command-line?view=vs-2019] :
cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build vcvarsall.bat x86 -vcvars_ver=14.16
Other things I found that might be worth mentioning here:
- AFAIK Qt Creator uses vswhere to detect installations of Visual Studio. This tool does not seem to support detecting multiple installed toolchains within a single MSVC installation, see: https://github.com/Microsoft/vswhere/issues/151
- The reason why the v140 / 14.0 toolchain is detected seems to be that this toolchain is installed with an own set of vcvars*.bat scripts in a seperate location, compared to newer toolchains which are not.
Anyhow, my expectations would be:
- Qt creator should automatically detect a toolchain that corresponds to vcvars_ver=14.16, because the MSVC 2017 toolchain is the one that was tested with Qt 5.12.x and that is currently supported.
- Qt creator should offer a way to manipulate vcvarsall commandline parameters, e.g. to put in custom versions of vc_vars (there can be even more tool sets installed) or to select a different windows SDK than the auto-selected one (there's an optional winsdk_version parameter, see the link above).
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-22772 MSVC Toolchain does not detect all compilers
- Closed
-
QTCREATORBUG-23570 MSVC2017 compilers not detected if they installed from MSVC2019
- Closed