Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. @echo off
  2. cls
  3. setlocal EnableDelayedExpansion
  4. title %~nx0 %1
  5. color 0f
  6. call "C:Program Files (x86)Microsoft Visual Studio 11.0Common7Toolsvsvars32.bat"
  7. call "C:Program Files (x86)Microsoft Visual Studio 11.0Common7ToolsVsDevCmd.bat"
  8. echo.
  9. set linker_file="C:my_compiler_libs.txt"
  10. if %~x1==.cpp cl /EHsc @%linker_file% %1
  11. if %~x1==.c cl /EHsc @%linker_file% %1
  12. if %~x1==.sln msbuild %1 /m /p:configuration=debug /p:platform=win32
  13. echo.
  14. if exist "%~n1.obj" del "%~n1.obj"
  15. echo.
  16. echo 1: compile again
  17. echo 2: run in cmd
  18. echo 3: run
  19. echo 4: exit
  20. echo.
  21. set /p answer=
  22. if %answer%==1 call %~f0 %1
  23. if %answer%==2 cmd /k "%~n1.exe"
  24. if %answer%==3 "%~n1.exe"
  25. if %answer%==4 exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement