繁体   English   中英

XCode找不到GCC

[英]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:

  1. 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 
  1. 从/ usr / bin目录中随机链接gcc-4.2只是在麻烦。 那不是xcode包中的gcc-谁知道它是否真的是同一版本。
  2. 重新安装为我修复了它,尽管我发现了特定的安装工具。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM