用Xcode 4.6在Mac OS X 10.8.2下編譯hello.c,我發出了推薦使用xcrun gcc cannot find header files的xcrun命令,但仍然收到錯誤,頭文件stdio .h無法找到。xcrun鏗鏘--sysroot找不到stdio.h
$ xcrun clang --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ -o hello hello.c
hello.c:2:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
$ cat hello.c
/* C program, Hello World */
#include <stdio.h>
int main()
{
printf("Hello World \n");
}