4

好的。我已按照Google API 页面上的所有步骤进行操作。我正在尝试与 Blogger 的 api 交互,但我得到了 9 个 Apple Mach-O Linker 错误。如何导入库并设置所有内容而不出现这些错误?谢谢!

这是错误:

Undefined symbols for architecture armv7:
  "_OBJC_METACLASS_$_GTLService", referenced from:
  _OBJC_METACLASS_$_GTLServiceBlogger in GTLBlogger_Sources.o
 (maybe you meant: _OBJC_METACLASS_$_GTLServiceBlogger)
  "_OBJC_CLASS_$_GTLService", referenced from:
  _OBJC_CLASS_$_GTLServiceBlogger in GTLBlogger_Sources.o
 (maybe you meant: _OBJC_CLASS_$_GTLServiceBlogger)
  "_OBJC_METACLASS_$_GTLObject", referenced from:
  _OBJC_METACLASS_$_GTLBloggerPage in GTLBloggerPage.o
  _OBJC_METACLASS_$_GTLBloggerPageAuthor in GTLBloggerPage.o
  _OBJC_METACLASS_$_GTLBloggerPageBlog in GTLBloggerPage.o
  _OBJC_METACLASS_$_GTLBloggerPageAuthorImage in GTLBloggerPage.o
  _OBJC_METACLASS_$_GTLBloggerBlog in GTLBloggerBlog.o
  _OBJC_METACLASS_$_GTLBloggerBlogLocale in GTLBloggerBlog.o
  _OBJC_METACLASS_$_GTLBloggerBlogPages in GTLBloggerBlog.o
  ...
  "_OBJC_METACLASS_$_GTLQuery", referenced from:
  _OBJC_METACLASS_$_GTLQueryBlogger in GTLBlogger_Sources.o
 (maybe you meant: _OBJC_METACLASS_$_GTLQueryBlogger)
  "_OBJC_METACLASS_$_GTLCollectionObject", referenced from:
  _OBJC_METACLASS_$_GTLBloggerPageList in GTLBloggerPageList.o
  _OBJC_METACLASS_$_GTLBloggerPostList in GTLBloggerPostList.o
  _OBJC_METACLASS_$_GTLBloggerBlogPosts in GTLBloggerBlog.o
  _OBJC_METACLASS_$_GTLBloggerPostReplies in GTLBloggerPost.o
  _OBJC_METACLASS_$_GTLBloggerCommentList in GTLBloggerCommentList.o
  _OBJC_METACLASS_$_GTLBloggerBlogList in GTLBloggerBlogList.o
  "_OBJC_CLASS_$_GTLObject", referenced from:
  _OBJC_CLASS_$_GTLBloggerPage in GTLBloggerPage.o
  _OBJC_CLASS_$_GTLBloggerPageAuthor in GTLBloggerPage.o
  _OBJC_CLASS_$_GTLBloggerPageBlog in GTLBloggerPage.o
  _OBJC_CLASS_$_GTLBloggerPageAuthorImage in GTLBloggerPage.o
  _OBJC_CLASS_$_GTLBloggerBlog in GTLBloggerBlog.o
  _OBJC_CLASS_$_GTLBloggerBlogLocale in GTLBloggerBlog.o
  _OBJC_CLASS_$_GTLBloggerBlogPages in GTLBloggerBlog.o
  ...
  "_OBJC_CLASS_$_GTLQuery", referenced from:
  _OBJC_CLASS_$_GTLQueryBlogger in GTLBlogger_Sources.o
 (maybe you meant: _OBJC_CLASS_$_GTLQueryBlogger)
  "_OBJC_CLASS_$_GTLCollectionObject", referenced from:
  _OBJC_CLASS_$_GTLBloggerPageList in GTLBloggerPageList.o
  _OBJC_CLASS_$_GTLBloggerPostList in GTLBloggerPostList.o
  _OBJC_CLASS_$_GTLBloggerBlogPosts in GTLBloggerBlog.o
  _OBJC_CLASS_$_GTLBloggerPostReplies in GTLBloggerPost.o
  _OBJC_CLASS_$_GTLBloggerCommentList in GTLBloggerCommentList.o
  _OBJC_CLASS_$_GTLBloggerBlogList in GTLBloggerBlogList.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

2 回答 2

0

我将引用@borrrden 已经写过的内容。这对我有用。

确保在“架构”下的构建设置中包含 armv7 架构

于 2014-02-27T18:10:09.803 回答
0

我和你有同样的问题。我通过再次检查所有步骤来解决。我发现了问题。哈哈!

构建阶段-->将二进制文件与库链接

在那里,所有框架在运行代码后都消失了!所以你要做的是再次添加框架。

请按如下方式添加框架: libGTLTouchStaticLib.a + Security.framework + SystemConfiguration.framework + MobileCoreServices.framework

于 2014-12-07T23:50:57.713 回答