链接器命令失败,退出代码为1(重复符号)

编程入门 行业动态 更新时间:2024-10-11 19:16:41
本文介绍了链接器命令失败,退出代码为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(重复符号)

本文发布于:2023-11-13 06:27:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583698.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:符号   命令   代码   链接

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!