【问题标题】:Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1命令 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang 失败,退出代码为 1
【发布时间】:2011-12-06 18:43:07
【问题描述】:

无法理解如何修复它以及为什么会出现?

    Ld /Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Products/Debug-iphonesimulator/Flylista.app/Flylista normal i386
    cd "/Users/atencion/Documents/Applications Development/Xcode Projects/Flylista"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Products/Debug-iphonesimulator -F/Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Products/Debug-iphonesimulator -filelist /Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Intermediates/Flylista.build/Debug-iphonesimulator/Flylista.build/Objects-normal/i386/Flylista.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Products/Debug-iphonesimulator/Flylista.app/Flylista

ld: duplicate symbol _OBJC_CLASS_$_FlightsViewController in /Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Intermediates/Flylista.build/Debug-iphonesimulator/Flylista.build/Objects-normal/i386/FlightViewController.o and /Users/atencion/Library/Developer/Xcode/DerivedData/Flylista-gcadfttyrgznkmafzaicacwytfey/Build/Intermediates/Flylista.build/Debug-iphonesimulator/Flylista.build/Objects-normal/i386/FlightsViewController.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

【问题讨论】:

  • 你尝试清理整个项目了吗?
  • 是的,还删除了派生数据。

标签: ios5 xcode4.2


【解决方案1】:

实际的错误就在你面前。由于重复符号:FlightsViewController,您的链接阶段似乎失败了。您可能已经定义了两次,或者您已经将它链接到一个库以及您的主构建中。

【讨论】:

  • @shim:你可以通过不使用同一个符号的多个定义来解决它。
  • 好吧,当我不小心包含“viewController.m”而不是“viewController.h”时,我遇到了同样的错误。有时有点着急..伴随着很多担心!
【解决方案2】:

当您复制/复制类时,这也可能经常发生。确保您没有在重复的类中定义任何可能在其他地方定义的常量,等等。

【讨论】:

    【解决方案3】:

    解决办法

    当你在使用 iOS 应用程序时,比如 iPhone 或 iPad,但你选错了

    “我的 Mac 64 位”你会得到这个错误

    所以选择合适的应用类型说

    iphone 视网膜(3.5 英寸) 设备 iphone 视网膜(4 英寸) iphone 视网膜 64 位

    ipad ipad视网膜

    etc 那么您将不会收到此错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-11
      • 2011-07-12
      • 2011-10-17
      • 1970-01-01
      相关资源
      最近更新 更多