osx - Sublime Text 3 C++ build system -
hello messed little c++ build system in sublime text 3 , can't run program. here build system:
{ "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": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" && open -a terminal -e \"${file_path}/${file_base_name}\"" } ] }
thanks help, nenor
the wrong think seems way write command
. it's not stated in new documentation, in old one can read
cmd: array containing command run , desired arguments.
so, build system should trick (this default provided):
{ "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}'"] } ] }
please note has reported having trouble c++.sublime-build
provided default (it's fine on os x). if that's case, consider salek's reply on this answer.
Comments
Post a Comment