Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- setlocal EnableDelayedExpansion
- title %~nx0 %1
- color 0f
- call "C:Program Files (x86)Microsoft Visual Studio 11.0Common7Toolsvsvars32.bat"
- call "C:Program Files (x86)Microsoft Visual Studio 11.0Common7ToolsVsDevCmd.bat"
- echo.
- set linker_file="C:my_compiler_libs.txt"
- if %~x1==.cpp cl /EHsc @%linker_file% %1
- if %~x1==.c cl /EHsc @%linker_file% %1
- if %~x1==.sln msbuild %1 /m /p:configuration=debug /p:platform=win32
- echo.
- if exist "%~n1.obj" del "%~n1.obj"
- echo.
- echo 1: compile again
- echo 2: run in cmd
- echo 3: run
- echo 4: exit
- echo.
- set /p answer=
- if %answer%==1 call %~f0 %1
- if %answer%==2 cmd /k "%~n1.exe"
- if %answer%==3 "%~n1.exe"
- if %answer%==4 exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement