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++'.
You can test that you have the C++ compiler, cl.exe , installed correctly by typing 'cl' and you should see a copyright message with the version and basic usage description.
cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio for Windows. Note. You can start this tool only from a Visual Studio developer command prompt.
cl.exe is usually located at %VCINSTALLDIR%\bin\ . VCINSTALLDIR environment variable is not set by default, but it is being set when you open Visual Studio's Native Tools Command Prompt.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With