0
我想通過崇高的文本運行一個c + +程序2.我不想添加bash到我的PATH。
我想更改默認的cmd命令以下:Sublime Text 2如何更改C++的默認運行時Shell命令?
./${file}
我環顧四周在C++包文件夾但只找到構建。
我欣賞一些幫助!
[編輯]
我的程序建立正確,但在運行時我得到這個:
[Error 2] The system cannot find the file specified
[cmd: [u'bash', u'-c', u"g++ 'C:...]
[dir: C:\Users\...]
[path: C:/.../
[Finished]
[編輯]按要求,我build文件。
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}
請包含您的'C++。sublime_build'文件。 – thefourtheye
這是默認的構建文件。 – user2316667