开发者

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:

  1. 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
  1. 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.
  2. Reinstalling fixed it for me, although I was finding that particular install flakey.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜