我现在也有同样的问题,但还没有找到正确的答案。我得到了错误:

    /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Intermediates/TestMoboSDK-Client.build/Debug-iphonesimulator/TestMoboSDK-Client.build/Objects-normal/x86_64/MoboSDK.o
    /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Products/Debug-iphonesimulator/libMoboSDK.a(MoboSDK.o)
duplicate symbol _OBJC_METACLASS_$_MoboSDK in:
    /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Intermediates/TestMoboSDK-Client.build/Debug-iphonesimulator/TestMoboSDK-Client.build/Objects-normal/x86_64/MoboSDK.o
    /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Products/Debug-iphonesimulator/libMoboSDK.a(MoboSDK.o)
ld: 75 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何帮助都是感激的。

最后,我找到了这个错误的原因,因为我添加了-ObjC到其他链接器标志。在删除这个值之后,我可以成功地构建我的项目,但我不知道为什么。有人能解释一下吗?


当前回答

在我的情况下,我把构建系统改为遗留系统,它工作了。

您可以在菜单中访问此选项:

文件>工作空间设置>构建系统

其他回答

对我来说,当我错误地为我的APP定义了两个入口点时,就发生了这种情况

@main struct AppName: App { //注释- @main

Or

@UIApplicationMain class AppDelegate //如何- @UIApplicationMain

寻找目标 选择生成设置 搜索“No Common Blocks”,选择为“No”。

这对我很有效

1.进入构建阶段

2.搜索文件名

3.删除重复的

->错误将自动恢复。

如果没有,试着搜索“文件”。M ",如果你看到任何#import "文件。M ",清除这条线

今天,我得到了同样的错误。错误的关键字是duplicate。我通过:

1. Remove the duplicate file at Build Phases-->Compile Sources
2. If you can not remove it at Build Phases, you need find the file at your project and remove the reference by DELETE :

3. Add the file to your project again
4. Add the file's .m to your Build Phases-->Compile Sources again
5. Build your project, the error will disappear

我面临着我所犯过的同样的错误

1.复制复制的符号文件(类名或框架名),从这一行(体系结构x86_64的重复符号)的末端开始。

2. 粘贴到Find Navigator并按enter

它显示了重复的类。我删除了重复的类并成功运行。