2

I recently updated Sharekit 2.0 in my app after moving to IOS 7, i used the update git commands as specified on the sharekit wiki. However now when i run the app its failing to build with the following errors:

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)

I have double checked the setup including frameworks and resources it all seems correctly setup, anybody know what the issue is?

SmokersCough
  • 967
  • 7
  • 22
  • Right i had made a small error, make sure you complete the "Add 3rd Party Frameworks" section from this installation tutorial:https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit – SmokersCough Oct 13 '13 at 16:12
  • I triple checked that I followed the instructions in that section and I'm still getting this error. Are you sure you didn't do something else to get this working? – Jeremy Hicks Oct 22 '13 at 16:24
  • Make sure you clean your project, also i had a few similar error messages and i was accidentally running the app in the 64 bit emulator, so make sure that's not the case. Also run the update command via git again and then drag the folders across as stated in the section of the tutorial i mentioned above. Hopefully that should fix it. – SmokersCough Oct 23 '13 at 16:47

3 Answers3

9

I faced the same problem after updating ShareKit submodule in a project that was previously working.

The step I was missing was dragging those three folders (located at folder ./ShareKit/Frameworks/) into my XCode project:

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

After that, everything was working fine again :)

josemando
  • 573
  • 2
  • 9
  • Yup this was the exact issue that caused the problem. Thanks Josemando! – SmokersCough Oct 29 '13 at 15:10
  • 1
    @Josemando Sobral: Thanks. It worked for me as well. I don't understand why we need to add this because I have installed the ShareKit framework using CocoaPods and it does all dependancies install. :( – Paresh Thakor Jan 04 '14 at 12:26
4

Adding frameworks to my project was not enough in my case, at least for the '_xml*' dependencies, so I had to add 'libxml2.dylib' in Build Phases > Link Binary With Libraries

txuslee
  • 416
  • 3
  • 5
0

After trying everything on the 'Build Active Architecture Only' side thinking that one of my target libraries didn't compile correctly I finally discovered the problem was much more mundane: I needed more libraries to build with the project. In my case CoreMotion, AddressBook and libxml2. I added them to Build Phases-> Link Binary with Libraries and everything went smooth. You can guess the library missed by the name of the functions that are not found.