我正在制作的应用程序遇到一些麻烦。我对此进行了研究,并查看了其他帖子,但是他们提出的修复对我不起作用。我正在运行所有最新的软件。

它说:

架构i386的3个重复符号
链接器命令失败,退出代码为1(使用-v查看调用)


  d
  / Users / RileyLloyd / Library / Developer / Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Products / Debug-iphonesimulator / People \
  Bingo.app/People \ Bingo普通i386
      cd“ /用户/ RileyLloyd /文档/ Xcode /人宾果”
      setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
      setenv PATH“ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/ usr / sbin:/ sbin“
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
  -L /用户/ RileyLloyd /库/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Products / Debug-iphonesimulator
  -F /用户/ RileyLloyd /库/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Products / Debug-iphonesimulator
  -文件列表/用户/ RileyLloyd /库/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People \
  Bingo.build/Debug-iphonesimulator/People \
  Bingo.build/Objects-normal/i386/People \ Bingo.LinkFileList -Xlinker
  -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 7.0 -framework CoreData -framework CoreGraphics -framework UIKit -framework
  基金会-Xlinker -dependency_info -Xlinker
  /用户/ RileyLloyd /库/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People \
  Bingo.build/Debug-iphonesimulator/People \
  Bingo.build/Objects-normal/i386/People \ Bingo_dependency_info.dat -o
  / Users / RileyLloyd / Library / Developer / Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Products / Debug-iphonesimulator / People \
  Bingo.app/People \ Bingo
  
  重复符号_OBJC_IVAR _ $ _ CollectionViewController._cellArray在:
      /用户/ RileyLloyd /图书馆/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/ViewController.o
      /用户/ RileyLloyd /图书馆/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/CollectionViewController.o重复
  符号_OBJC_CLASS _ $ _ CollectionViewController在:
      /用户/ RileyLloyd /图书馆/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/ViewController.o
      /用户/ RileyLloyd /图书馆/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/CollectionViewController.o重复
  符号_OBJC_METACLASS _ $ _ CollectionViewController在:
      /用户/ RileyLloyd /图书馆/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/ViewController.o
      /用户/ RileyLloyd /库/开发人员/ Xcode / DerivedData / People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye / Build / Intermediates / People
  Bingo.build/Debug-iphonesimulator/人
  Bingo.build/Objects-normal/i386/CollectionViewController.o ld:3
  体系结构i386铛的重复符号:错误:链接器命令
  失败,退出代码为1(使用-v查看调用)

最佳答案

应用程序中的两个模块(ViewControllerCollectionViewController)提供了类CollectionViewController的实现。这三个重复符号是类元数据。

您可以通过多种方式执行此操作:


您有两个模块声明相同的类。也许是残留物?
@implementation CollectionViewController出现在同时包含在.hCollectionViewController.m中的ViewController.m文件中-或者您在某个位置包含了.m文件。

关于c++ - Apple Mach-O链接器错误-符号重复,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20817559/

10-11 17:51