My personal guess is that your console environment variables are not configured. If it is 2015, you can try using "Start Menu > Visual Studio 2015 > VS2015 Developer Command Prompt", which will automatically configure the console environment variables. As shown below:
VS2013 should be similar.
The specific script files are in the <安装路径>Microsoft Visual Studio <版本号>Common7Tools directory. There should be script files called VsDevCmd.bat and vsvars32.bat. These files are used to set environment variables. Usually running VsDevCmd.bat is enough, but it may be more troublesome to set it manually.
My personal guess is that your console environment variables are not configured. If it is 2015, you can try using "Start Menu > Visual Studio 2015 > VS2015 Developer Command Prompt", which will automatically configure the console environment variables. As shown below:
VS2013 should be similar.
The specific script files are in the
<安装路径>Microsoft Visual Studio <版本号>Common7Tools
directory. There should be script files calledVsDevCmd.bat
andvsvars32.bat
. These files are used to set environment variables. Usually runningVsDevCmd.bat
is enough, but it may be more troublesome to set it manually.Open a console, execute the
VS目录/VC/
script undervcvarsall.bat
to set environment variables, and then try againbuildwin 120
.