XCode can't find GCC
After i updated iPhone SDK to 4.1 I can no longer compile neither for Simulator or Device. I get the following message:
开发者_运维百科error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory)
Solution for this?
Check to see if it is there and accessible, sudo ls -l /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
. Mine has these permissions: -rwxr-xr-x 1 root wheel 166128 Jul 26 15:05 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
Have you tried reinstalling yet?
I solved this by doing:
sudo cp /usr/bin/gcc-4.2 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
I had this happen to me. So for xcode 3.2.5:
gcc-4.2 is definitely installed by the installer. ie:
ls /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g* =>
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
- Randomly linking in the gcc-4.2 from the /usr/bin directory is just asking for trouble. That's not the gcc that is part of the xcode package - who knows if it is really the same version.
- Reinstalling fixed it for me, although I was finding that particular install flakey.
精彩评论