我将iPhone SDK更新为4.1后,我无法再为Simulator或Device编译。我收到以下消息:
error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory)
解决这个问题?
答案 0 :(得分:2)
检查它是否存在且可访问,sudo ls -l /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
。我有这些权限:-rwxr-xr-x 1 root wheel 166128 Jul 26 15:05 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
您是否尝试过重新安装?
答案 1 :(得分:2)
我通过以下方式解决了这个问题:
sudo cp /usr/bin/gcc-4.2 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
答案 2 :(得分:1)
我发生了这件事。所以对于xcode 3.2.5:
gcc-4.2绝对是安装的 安装程序。即:
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