我正在尝试用 OS X 10.9中的 C 语言和 GCC 4.9(实验)编译一个程序。由于某种原因,我在编译时遇到了以下错误:
gcc: fatal error: stdio.h: No such file or directory
然后我尝试了一个简单的 Hello World 程序:
#include <stdio.h>
int main(int argc, const char *argv[])
{
printf("Hello, world!");
return 0;
}
Again, upon running gcc -o ~/hello ~/hello.c
, I got the same error. I'm using an experimental version of gcc
, but it seems implausible that there would be a release which generated errors upon importing stdio
. What could be causing this issue, and how can it be fixed?