iOS-体系结构armv7的2个重复符号 [英] iOS - 2 duplicate symbols for architecture armv7

查看:38
本文介绍了iOS-体系结构armv7的2个重复符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中的任何地方都使用 Resty ,但是由于我必须上传图像到服务器,因此我尝试添加另一个名为 RestKit 的框架来处理文件上传.但是当我编译时,出现了错误:

 重复符号_NewBase64Decode在:/Users/iforests/Library/Developer/Xcode/DerivedData/Owlch-gnysrakcbhsgkubbjjjfbahlocqi/Build/Products/Debug-iphoneos/libRestKit.a(NSData+Base64.o)/用户/iforests/Documents/iOSwor​​kspace/Owlch/LRResty.framework/LRResty(NSData+Base64.o)ld:体系结构armv7的2个重复符号clang:错误:链接器命令失败,退出代码为1(使用-v查看调用) 

有什么方法可以解决此问题而无需删除LRResty(因为明天是该项目的截止日期).非常感谢大家!

解决方案

从Resty源中删除这些文件.

LRResty/类/类别/NSData+Base64.hLRResty/类/类别/NSData+Base64.m

这将解决链接问题.

如果由于该原因而停止工作,请在Resty代码中重命名NSData + Base64的文件和类别,然后在Resty代码导入"NSData + Base64.h"的任何地方,将导入更改为您重命名类别的任何内容

I am using Resty everywhere in my project, but now since I have to upload image to server, so I try to add another framework called RestKit to handle file upload. But when I compiled, it got error:

duplicate symbol _NewBase64Decode in:
    /Users/iforests/Library/Developer/Xcode/DerivedData/Owlch-gnysrakcbhsgkubbjjjfbahlocqi/Build/Products/Debug-iphoneos/libRestKit.a(NSData+Base64.o)
    /Users/iforests/Documents/iOSworkspace/Owlch/LRResty.framework/LRResty(NSData+Base64.o)
ld: 2 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to solve this problem without removing LRResty (since tomorrow is the deadline of this project). Thank you all so much!

解决方案

Delete these files from the Resty source.

LRResty/Classes/Categories/NSData+Base64.h LRResty/Classes/Categories/NSData+Base64.m

That will take care of the linking issue.

If it stops working because of that, rename the files and category for NSData+Base64 in the Resty code and then anywhere the Resty code imports "NSData+Base64.h", change the import to whatever you rename the category

这篇关于iOS-体系结构armv7的2个重复符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆