我在 Google 搜尋 以下問題:
sublime call a terminal to run C
就找到 以下網址:
http://stackoverflow.com/questions/27570246/compile-and-run-in-mac-terminal-sublime-text-files
他說
加入以下這行
{
"cmd": ["bash", "-cpp", "g++ '${file}' -o '${file_path}/${file_base_name}' && open -a Terminal.app '${file_path}/${file_base_name}'"]
}於 sublime 的 Tools --> Build System --> New Build System ...
另存新檔起來,取個你喜歡的檔名,比如說 ryCpp.sublime-build
就可以了。
試試看吧。


沒有留言:
張貼留言