Visual Studio 2017 failed to locate cl.exe

不羁岁月 提交于 2021-02-16 04:55:30

问题


I recently installed Visual Studio 2017 and need to change something in a C++ project.

But when I try to build, it says cl.exe is missing. None of the solutions provided online seem to work.

I do have a cl.exe, but it is located under this path:

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.

And I have installed 'Desktop development with C++'.


回答1:


I solved it by running vcvars.bat.

For Visual Studio Enterprise 2017 it is located under the following directory:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd\ext



来源:https://stackoverflow.com/questions/45207356/visual-studio-2017-failed-to-locate-cl-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!