After upgrading to Lion and installing Xcode 4.3, I cannot get the "Hello, World" command to compile.
include <stdio.h>
int
main ( int argc, char *argv[]) {
printf("Hello, World!\n");
}
$ gcc hello.c
hello.c:1:19: error: stdio.h: No such file or directory
I see stdio.h in./SDKs/MacOSX10.6.sdk/usr/include/stdio.h, but it is a bit surprising that there is no version 10.7. Did my installation fail? He reported success.
The standard solution to this problem after some Googling is to reinstall Xcode. But Xcode comes through the App Store, does not give me the option to reinstall. I also never saw various other options, such as "Unix development", which are mentioned elsewhere.
Ideas?
source
share