作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用OpenKit Framework将排行榜添加到我的游戏中。在他们的文档之后,我添加了所有必需的库+框架,但是发生了以下错误:
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._applicationLaunchNotificationObserver in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._key in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._secret in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._signatureMethod in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._realm in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
....
ld: 19 duplicate symbols for architecture armv7s
最佳答案
经过数周的搜索,我找到了解决方案。不用在Google Ads中使用“-ObjC”链接器标志,而是“force_load”是理想的解决方案。
根据@OpenKit的说法,“-ObjC”标志与OpenKit lib混为一谈:
The problem is that the -ObjC flag loads all categories, and we removed some categories from the OpenKit SDK to make it work without using that flag.
force_load :load only that framework without messing with anything else.[source]
关于objective-c - 添加OpenKit时出现重复符号错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22589828/
我是一名优秀的程序员,十分优秀!