在继续提问之前,我是编程的100%新手,而且我是独立的。 所以,即使你觉得它看起来很愚蠢,也请回答我的问题。
我设法成功安装了命令行工具:
LazyRen:~ LazyRen$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
LazyRen:~ LazyRen$ xcode-select --install
xcode-select: note: install requested for command line developer tools
LazyRen:~ LazyRen$ gcc
clang: error: no input files
但问题是当我尝试使用ST3构建最基本的代码时,它给了我
clang: error: no input files
[Finished in 0.0s with exit code 1]
[cmd: ['gcc', 'Hello C World!', '-o', 'Hello C World!']]
[dir: /Users/LazyRen/Library/Application Support/Sublime Text 3/Packages/User]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
此。 我只是不知道需要什么样的输入文件。任何提示?
答案 0 :(得分:1)
你似乎在ST3内丢失了。因为你有Xcode为什么不用它?要运行命令行“Hello World”C程序,请执行以下操作:
现在继续你的C教科书。另请参阅Xcode文档。在后者中,您将了解如何找到刚刚在光盘上编译的代码,如果您愿意,可以从终端运行它。
HTH