gpt4 book ai didi

c++ - Apple Mach-O 链接器错误 - 重复符号

转载 作者:行者123 更新时间:2023-11-28 07:12:03 24 4
gpt4 key购买 nike

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

它说:

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

Ld /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator/People\ Bingo.app/People\ Bingo normal i386 cd "/Users/RileyLloyd/Documents/Xcode/People Bingo" 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/Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator -F/Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Products/Debug-iphonesimulator -filelist /Users/RileyLloyd/Library/Developer/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 Foundation -Xlinker -dependency_info -Xlinker /Users/RileyLloyd/Library/Developer/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

duplicate symbol _OBJC_IVAR_$_CollectionViewController._cellArray in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o duplicate symbol _OBJC_CLASS_$_CollectionViewController in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o duplicate symbol _OBJC_METACLASS_$_CollectionViewController in: /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/ViewController.o /Users/RileyLloyd/Library/Developer/Xcode/DerivedData/People_Bingo-eqtneohyjbwwpxclkkhkbtkcddye/Build/Intermediates/People Bingo.build/Debug-iphonesimulator/People Bingo.build/Objects-normal/i386/CollectionViewController.o ld: 3 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

最佳答案

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

您可以通过多种方式完成此操作:

  • 你有两个模块声明同一个类。也许一个是退化的?
  • @implementation CollectionViewController 出现在 .h 文件中,该文件包含在 CollectionViewController.mViewController.m< 中 - 或者你在某处包含了一个 .m 文件。

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com