重复符号_OBJC_CLASS _ $ _ Base64

时间:2016-11-19 11:17:58

标签: ios objective-c xcode linker-errors

我正在尝试将mobile.connect.framework添加到现有项目中。在添加框架之前,应用程序正在构建并正常运行。但是,只要我添加框架,它就会给出重复符号_OBJC_CLASS _ $ _ Base64错误。我经历了许多帖子,如Duplicate Symbol _OBJC_CLASS_$_LoginController

How duplicate symbol problem arises。但无法找到解决方案。 请帮我解决这个问题。它已经消耗了我半天。

错误: - ld: warning: directory not found for option '-L/Users/shailendra.suriyal/Documents/MyProjects/taxi_ios_client/UberNewUser/ExternalLib/CardIO' duplicate symbol _OBJC_CLASS_$_Base64 in: /Users/shailendra.suriyal/Library/Developer/Xcode/DerivedData/Muri-hadqxhhslzvmwfddwlthosrdljjy/Build/Intermediates/Muri.build/Debug-iphonesimulator/Muri.build/Objects-normal/x86_64/Base64.o /Users/shailendra.suriyal/Documents/MyProjects/taxi_ios_client/UberNewUser/ExternalLib/FrameWork/mobile.connect.framework/mobile.connect duplicate symbol _OBJC_METACLASS_$_Base64 in: /Users/shailendra.suriyal/Library/Developer/Xcode/DerivedData/Muri-hadqxhhslzvmwfddwlthosrdljjy/Build/Intermediates/Muri.build/Debug-iphonesimulator/Muri.build/Objects-normal/x86_64/Base64.o /Users/shailendra.suriyal/Documents/MyProjects/taxi_ios_client/UberNewUser/ExternalLib/FrameWork/mobile.connect.framework/mobile.connect ld: 2 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

3 个答案:

答案 0 :(得分:1)

最后,我明白了。我刚从Build Phases下的已编译资源中删除了Base64.h。

答案 1 :(得分:0)

您似乎正在为Base64类链接源和库。

这一行...... /Users/shailendra.suriyal/Library/Developer/Xcode/DerivedData/Muri-hadqxhhslzvmwfddwlthosrdljjy/Build/Intermediates/Muri.build/Debug-iphonesimulator/Muri.build/Objects-normal/x86_64/Base64.o ......说你直接编译了这个课程。

这一个......     /Users/shailendra.suriyal/Documents/MyProjects/taxi_ios_client/UberNewUser/ExternalLib/FrameWork/mobile.connect.framework/mobile.connect ...说你是从mobile.connect.framework二进制文件中链接它。

如果您从库中使用它,则应从项目中删除源。

(如果您已经删除了源代码并且仍然是这样,请删除派生数据并重试。)

答案 2 :(得分:0)

“LoginController”的重复文件创建