After upgrading to Lion, and installing XCode 4.3 I can't get "Hello, World" 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 a stdio.h in ./SDKs/MacOSX10.6.sdk/usr/include/stdio.h, but it's a little surprising that there isn't a 10.7 version. Did my install fail? It reported success.
The standard solution to this problem, after some Googling, is to reinstall XCode. But XCode is delivered through the App store with doesn't give me a re-install option. I also never saw the various other options such as "Unix development" which are referenced in other places.
Ideas?
It turns out the solution is to download the "command line tools" package. Once downloades, run the package installer and all is well. The /Developer directory is obsolete, no longer used in Xcode 4.3
The Apple developer web site is my friend
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With