I previously had Visual Studio 2015 (14.0) Build tools installed, and I could build a simple C++ program, without any IDE, with:
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
cl helloworld1.cpp
Now that I installed Visual Studio 2019 Build Tools, calling vcvarsall.bat
gives this message:
Windows cannot find 'powershell.exe'
but after closing the dialog, it still continues (!). But then it fails with:
cl : Command line error D8027 : cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\c1xx.dll'
I don't see why powershell would be mandatory to just set a few environments variables and set up everything to use cl.exe
.
Question: what's the proper way to call cl.exe with VS Build Tools 2019?
Shouldn't we call vcvarsall.bat
first, like with previous versions?
(important: I'm looking for a 100% terminal mode, no IDE)