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:
- From the Windows Start menu, I selected, "developer command prompt".
- I added an option to Visual Studio to add a developer command prompt as an external tool following the suggestions here: https://community.dynamics.com/nav/b/navvanvugts/archive/2017/03/13/how-to-add-visual-studio-command-prompt-to-visual-studio
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?