链接器命令失败,退出代码为1(重复符号) [英] Linker command failed with exit code 1 (duplicate symbol)

查看:636
本文介绍了链接器命令失败,退出代码为1(重复符号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Unity开发游戏,我使用过Admob,Facebook和GameCenter。它在iOS上工作正常,直到我为应用内购买添加了OpenIAB,虽然它在Unity Editor中运行良好。

I developing a game in Unity and I have used Admob, Facebook and GameCenter in it. It was working fine on iOS until I have added the OpenIAB for in-app purchase, though it works fine in Unity Editor.

我在xcode中收到此错误:

I am getting this error in xcode:


重复符号__Z14MakeStringCopyPKc in:
/ Users / UmerAzeem / Library / Developer / Xcode / DerivedData / Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai / Build /Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBUnityUtility.o
/ Users / UmerAzeem / Library / Developer / Xcode / DerivedData / Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai /Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AppStoreDelegate.o
ld:1个用于架构armv7 clang的重复符号:错误:链接器
命令失败,退出代码为1(使用-v查看调用)

duplicate symbol __Z14MakeStringCopyPKc in: /Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBUnityUtility.o /Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AppStoreDelegate.o ld: 1 duplicate symbol for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

查看此处的错误截图

我几乎尝试了所有的我可以在互联网上找到的解决方案,但仍然不明白我怎么能删除这个重复错误,我也试过寻找重复的文件,但它也徒劳无功,有人帮助我摆脱这个,会很感激。
谢谢。

I have tried almost all the solution that I could find over the internet, but still don't understand how can I remove this duplication error, I have tried looking for duplicate files too, but it also went in vain, someone help me out of this, would appreciate it. Thanks.

推荐答案

在项目中查找:


MakeStringCopy

MakeStringCopy

并确保它只存在一次(如果存在)。如果它看起来多了一次,重命名一次(确保将它重命名为它被调用的地方)并尝试再次构建。

And make sure it exists (if exists) only once. If it appears more then once, rename one (make sure to rename it where it being called as well) and try to build again.

这篇关于链接器命令失败,退出代码为1(重复符号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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