Sharekit 2.0构建失败的问题

时间:2013-10-13 14:11:51

标签: sharekit

我最近在移植到IOS 7后在我的应用程序中更新了Sharekit 2.0,我使用了sharekit wiki上指定的update git命令。但是现在当我运行应用程序时,它无法构建并出现以下错误:

Undefined symbols for architecture i386:
  "_FBErrorParsedJSONResponseKey", referenced from:
      ___27-[SHKFacebook doNativeShow]_block_invoke in libShareKit.a(SHKFacebook.o)
      -[SHKFacebook FBRequestHandlerCallback:result:error:] in libShareKit.a(SHKFacebook.o)
  "_FacebookSDKDomain", referenced from:
      ___27-[SHKFacebook doNativeShow]_block_invoke in libShareKit.a(SHKFacebook.o)
  "_OBJC_CLASS_$_DBRequest", referenced from:
      objc-class-ref in libShareKit.a(SHKDropbox.o)
  "_OBJC_CLASS_$_DBRestClient", referenced from:
      objc-class-ref in libShareKit.a(SHKDropbox.o)
  "_OBJC_CLASS_$_DBSession", referenced from:
      objc-class-ref in libShareKit.a(SHKDropbox.o)
  "_OBJC_CLASS_$_FBDialogs", referenced from:
      objc-class-ref in libShareKit.a(SHKFacebook.o)
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in libShareKit.a(BufferSheetViewController.o)
  "_OBJC_CLASS_$_FBRequestConnection", referenced from:
      objc-class-ref in libShareKit.a(SHKFacebook.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in libShareKit.a(BufferSheetViewController.o)
      objc-class-ref in libShareKit.a(SHKFacebook.o)
  "_OBJC_CLASS_$_FBSettings", referenced from:
      objc-class-ref in libShareKit.a(SHKFacebook.o)
  "_OBJC_CLASS_$_GPPShare", referenced from:
      objc-class-ref in libShareKit.a(SHKGooglePlus.o)
  "_OBJC_CLASS_$_GPPSignIn", referenced from:
      objc-class-ref in libShareKit.a(SHKGooglePlus.o)
  "_xmlFreeDtd", referenced from:
      -[ENXMLDTD dealloc] in libShareKit.a(ENXMLDTD.o)
  "_xmlFreeTextWriter", referenced from:
      -[ENXMLWriter dealloc] in libShareKit.a(ENXMLWriter.o)
      -[ENXMLWriter endDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlGetCharEncodingName", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlGetExternalEntityLoader", referenced from:
      +[ENXMLDTD initialize] in libShareKit.a(ENXMLDTD.o)
  "_xmlGetLastError", referenced from:
      _CheckXMLResult in libShareKit.a(ENXMLWriter.o)
      -[ENXMLDTD initWithContentsOfFile:] in libShareKit.a(ENXMLDTD.o)
  "_xmlHashLookup", referenced from:
      -[ENXMLDTD xmlEntityNamed:] in libShareKit.a(ENXMLDTD.o)
      -[ENXMLDTD xmlElementNamed:] in libShareKit.a(ENXMLDTD.o)
  "_xmlIOParseDTD", referenced from:
      -[ENXMLDTD initWithContentsOfFile:] in libShareKit.a(ENXMLDTD.o)
  "_xmlNewInputFromFile", referenced from:
      _enxmlExternalEntityLoader in libShareKit.a(ENXMLDTD.o)
  "_xmlNewTextWriter", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlOutputBufferCreateIO", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlParserInputBufferCreateFilename", referenced from:
      -[ENXMLDTD initWithContentsOfFile:] in libShareKit.a(ENXMLDTD.o)
  "_xmlResetLastError", referenced from:
      _CheckXMLResult in libShareKit.a(ENXMLWriter.o)
      -[ENXMLDTD initWithContentsOfFile:] in libShareKit.a(ENXMLDTD.o)
  "_xmlSetExternalEntityLoader", referenced from:
      +[ENXMLDTD initialize] in libShareKit.a(ENXMLDTD.o)
  "_xmlTextWriterEndCDATA", referenced from:
      -[ENXMLWriter endCDATA] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterEndDocument", referenced from:
      -[ENXMLWriter endDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterEndElement", referenced from:
      -[ENXMLWriter endElement] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterSetIndent", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterStartCDATA", referenced from:
      -[ENXMLWriter startCDATA] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterStartDocument", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterStartElement", referenced from:
      -[ENXMLWriter startElement:] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterWriteAttribute", referenced from:
      -[ENXMLWriter writeAttributeName:value:] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterWriteCDATA", referenced from:
      -[ENXMLWriter writeCDATA:] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterWriteRaw", referenced from:
      -[ENXMLWriter startDocument] in libShareKit.a(ENXMLWriter.o)
      -[ENXMLWriter writeString:raw:] in libShareKit.a(ENXMLWriter.o)
  "_xmlTextWriterWriteString", referenced from:
      -[ENXMLWriter writeString:raw:] in libShareKit.a(ENXMLWriter.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经仔细检查了设置,包括框架和资源,它们似乎都正确设置,有人知道问题是什么吗?

3 个答案:

答案 0 :(得分:9)

在先前正在运行的项目中更新ShareKit子模块后,我遇到了同样的问题。

我缺少的步骤是将这三个文件夹(位于文件夹./ShareKit/Frameworks/)拖到我的XCode项目中:

  • DropboxSDK.framework
  • FacebookSDK.framework
  • GooglePlus.framework

之后,一切都恢复正常:)

答案 1 :(得分:4)

在我的情况下,将框架添加到我的项目是不够的,至少对于'_xml *'依赖项,所以我必须在Build Phases>中添加'libxml2.dylib'。链接二进制文件库

答案 2 :(得分:0)

在尝试“仅构建主动架构”方面的一切后,我认为我的一个目标库没有正确编译,我终于发现问题更加平凡:我需要更多的库来构建项目。在我的案例中,CoreMotion,AddressBook和libxml2。我将它们添加到Build Phases->链接Binary与库,一切顺利。您可以通过未找到的函数名称猜测库遗漏。