Visual Studio 2017: vcvars for toolset v140

前端 未结 4 1149
忘了有多久
忘了有多久 2021-02-09 06:35

I installed Visual Studio 2017 and toolsets v140 and v141. To work with v140 toolset, I need to set the necessary environment via vc

4条回答
  •  独厮守ぢ
    2021-02-09 07:22

    There is an additional command-line argument for the newer vcvars*.bat files: vcvars_ver.

    To setup an enviroment using the VS2015 toolchain with VS2017 one has to append -vcvars_ver=14.0 to the new vcvars*.bat call.

    E.g. "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 8.1 -vcvars_ver=14.0 sets up an environment for x64 using Windows 8.1 SDK and the MSVC2015 toolchain.

    There is no need to change any value in the registry or modify the installed batch files.

    Source: https://developercommunity.visualstudio.com/solutions/140023/view.html

提交回复
热议问题