![](/img/trans.png)
[英]why can't xcodebuild find gcc 4-2 after installing XCode 4.2?
[英]XCode can't find GCC
将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)
解决方案呢?
检查它是否在那里并且可以访问, 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
您是否尝试过重新安装?
我通过以下方法解决了这个问题:
sudo cp /usr/bin/gcc-4.2 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
我发生了这种事。 因此对于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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.