@echo off :: adjust path below to your install location call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 :: compile the given file(s) cl /EHsc /W4 /O2 %*