I am unable to run 'cl', the Microsoft Visual Studio C++ compiler, from a command line prompt in Windows 10. I am using a new Windows 10 installation and a new Microsoft Visual Studio 2017 community edition.
I get the error: 'cl' is not recognized as an internal or external command.
I have tried to run it from within two different prompts:
Neither worked. Each time gives the above error.
There are many threads about this issue on the web but they all seem to share the characteristic that the information given is not accurate or current for my and others' systems. (This worked fine with earlier versions of Visual Studio, but apparently Microsoft changed many of their locations/scripts for the 2017 version without updating or testing the documentation, so existing documentation, in the app and online, is a mishmash of inconsistent advice for different versions of Visual Studio).
My question is: from a new Windows 10 installation, how can I access the Microsoft C++ compiler from the command line?
This is indeed broken in VS2017. AFAICT, Microsoft is aware.
You can still create a similar environment by staring a regular command prompt, and running Common7\Tools\VsDevCmd.bat
. This is usually found in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
(where the last part depends on the VS2017 version).
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