Skip to content

Instantly share code, notes, and snippets.

@retorillo
Last active July 21, 2017 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retorillo/06dd3629729034d6d35158d84f40790e to your computer and use it in GitHub Desktop.
Save retorillo/06dd3629729034d6d35158d84f40790e to your computer and use it in GitHub Desktop.

CL command does not work on the following batch file because build.bat will stop by showing message "Hit any key to close this window..." before CL. (vcvarsall.bat uses exit /b)

rem buid.bat
...\vcvarsall.bat x64
cl ...

USE &&

rem build.bat
...\vcvarsall.bat x64 && cl

Or CALL(https://technet.microsoft.com/en-us/library/bb490873.aspx)

Calls one batch program from another without stopping the parent batch program.

rem build.bat
CALL ...\vcvarsall.bat x64
cl ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment