[英]Visual Studio 2017 failed to locate cl.exe
I recently installed Visual Studio 2017 and need to change something in a C++ project.我最近安装了 Visual Studio 2017,需要更改 C++ 项目中的某些内容。
But when I try to build, it says cl.exe is missing.但是当我尝试构建时,它说缺少 cl.exe。 None of the solutions provided online seem to work.
在线提供的解决方案似乎都不起作用。
I do have a cl.exe, but it is located under this path:我确实有一个 cl.exe,但它位于以下路径下:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64
I have also tried running vcvars32.bat
, but that does not seem to make any changes.我也试过运行
vcvars32.bat
,但这似乎没有做任何改变。
And I have installed 'Desktop development with C++'.我已经安装了“使用 C++ 进行桌面开发”。
I solved it by running vcvars.bat
.我通过运行
vcvars.bat
解决了它。
For Visual Studio Enterprise 2017 it is located under the following directory:对于 Visual Studio Enterprise 2017,它位于以下目录下:
C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\vsdevcmd\\ext
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.