iOS 奇怪的链接器行为 - 无法使用 Three20 编译 GData
我一直在尝试使用 Three20 在项目中编译 Google 数据库。问题是,如果我根据需要将“-ObjC”标志添加到我的目标以使 GData 链接起来,我最终会在 Three20 中收到如下错误:
ld: /Users/macuser/Dropbox/DFJ/third20/Build/Products/Release-iphoneos/libThree20UICommon.a(TTBaseViewController.o) 和 ../third20/Build/Products/Release- 中存在重复符号 _OBJC_METACLASS_$_TTBaseViewController iphoneos/libThree20UICommon.a(TTBaseViewController.o) collect2:ld返回1退出状态
现在,如果我取出 -ObjC 标志,则 google 库不会链接:
“_OBJC_CLASS_$_GDataServiceGoogleYouTube”,引用自:
PitchStart.o 中的 objc-class-ref-to-GDataServiceGoogleYouTube
如何让这两者相互配合?
I've been trying to compile the Google Data libraries in a project with three20. The problem is if I add the "-ObjC" flag to my target as needed to get the GData to link I end up getting errors such as this in Three20:
ld: duplicate symbol _OBJC_METACLASS_$_TTBaseViewController in /Users/macuser/Dropbox/DFJ/three20/Build/Products/Release-iphoneos/libThree20UICommon.a(TTBaseViewController.o) and ../three20/Build/Products/Release-iphoneos/libThree20UICommon.a(TTBaseViewController.o)
collect2: ld returned 1 exit status
Now if I take out the -ObjC flag then the google libraries don't link:
"_OBJC_CLASS_$_GDataServiceGoogleYouTube", referenced from:
objc-class-ref-to-GDataServiceGoogleYouTube in PitchStart.o
How to get both of these to play nice with each other?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我修好了。您无法链接到已编译的库。而只需将所有源 .m 和 .h 文件拖到您的项目中即可!
I fixed it. You cannot link to the compiled library. Rather just drag all of the source .m and .h files into your project!