2
我有从v3更新到v4.2.1从v3它工作正常,但作为C新手我想在文本Wrangler中编码和在CLI中用gcc编译。由于某种原因,现在gcc不能在mac上工作
GCC返回“未找到命令”(它精细前面的工作)
一些谷歌上搜索我想通了GCC移至/开发人员的/ usr/bin中后从/ usr/bin中(我可以在那里看到它)。 现在gcc运行时,我使用确切的路径,但它找不到任何头文件。
my-MacBook-Pro:Desktop user$ /Developer/usr/bin/gcc -o program program.c
program.c:15:19: error: stdio.h: No such file or directory
program.c:16:18: error: math.h: No such file or directory
program.c:17:20: error: stdlib.h: No such file or directory
program.c: In function ‘main’:
program.c:33: warning: incompatible implicit declaration of built-in function ‘malloc’
program.c:35: warning: incompatible implicit declaration of built-in function ‘sqrt’
program.c:44: warning: incompatible implicit declaration of built-in function ‘printf’
program.c:65: warning: incompatible implicit declaration of built-in function ‘printf’
任何帮助,非常感谢。
下载部分命令行工具Xcode的,这是不完全正确@Butaca ...的Xcode 4.3是什么带走了/ Developer目录并引入了“命令行工具”安装程序包。 –
对不起。你是对的。我纠正了我的帖子。谢谢。 – Butaca
如何使用xcode-select来解决我的问题? –