sublime text 2 编译运行 objective-c 代码配置方式如下:
打开 Tools -> Build System -> New Build System,新建一个 Objective-C.sublime-build 文件
复制下面内容
{
"cmd": ["bash", "-c", "clang -lobjc -framework Cocoa -framework Carbon -o /tmp/${file_name}_sublime_build $file"],
"file_regex": "^(.*?):([0-9]+):([0-9]+): (.*)",
"selector": "source.objc",
"variants": [
{
"name": "Run",
"cmd": ["bash", "-c", "clang -lobjc -framework Cocoa -framework Carbon -o /tmp/${file_name}_sublime_build $file && /tmp/${file_name}_sublime_build"]
}
]
}