SublimeText2でC++を実行する時のビルド設定
動作確認済みのビルド設定を下記にメモしておきます。
環境
- Mac (OSX Yosemite)
- SublimeText2
C++_make.sublime-build
{
"cmd": ["make"],
"working_dir": "${file_path}",
"selector": "source.cpp",
"variants":
[
{
"name": "Run",
"cmd": ["make", "run"]
}
]
}
Makefileの例
Makefile
main: test.o test2.o
g++ -Wall test.o test2.o -o main
test.o: test.c
g++ -c test.c
test2.o: test2.c
g++ -c test2.c
run: ./main
./main