-
-
Save vhanla/06afec87e704ab91a04c89e41eb165b2 to your computer and use it in GitHub Desktop.
Visual C++ build system for sublime text to exec and compile .c and .cpp files from Subime Text editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["vcvars32.bat", "&&", "cl", "/EHsc", "/Za", "${file}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c, source.cpp, source.c++", | |
// By default cl is not in your PATH, so add it to your path (preferably) | |
// or uncomment "path" and check that it has correct value | |
//"path": "%PATH%;path:/to/folder/where/cl.exe/located", | |
// e.g. "path" : "%PATH%;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\", | |
// this also will set path for vcvars32.bat | |
"shell": true, // Without this sublime has hard times to parse "&" in out command line | |
"variants": | |
[ | |
{ | |
"name": "Run in output window", // for console programs that don't require input, otherwise it might run hidden | |
"cmd": ["vcvars32.bat", "&&", "cl", "/EHsc", "/Za", "${file}", "&&", "${file_path}/${file_base_name}.exe"] | |
}, | |
{ | |
"name": "Run in external window", // recommended | |
"cmd": ["vcvars32.bat", "&&", "cl", "/EHsc", "/Za", "${file}", "&&", "start", "/D", "${file_path}", "${file_base_name}.exe"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The syntax has probably changed forr ST3