If you do C programming on Windows you need cl.exe
in your PATH
.
Unfortunately, running the batch file to locate the cl.exe
compiler (vcvarsall.bat
) takes about ~5 seconds!
That's only a problem on new Command Prompt sessions, but if you use a program that kicks off a build step it's really annoying to have to run this before any of your build commands.
But, thankfully, there's a way around this. We can create a script to inflate the same environment variables that vcvarsall.bat
ultimately sets up.
As a side-effect, this is also how to have a single file to manage all of your Command Prompt environment variables in Windows.