Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linker error with ShareKit ios

i have spent 3 days for searching the solution. I don't know what to do with this... I need the -ObjC flag for SDWebImage library ( and AFNetworking too, i think) . I can remove it, and everything is fine with ShareKit, but not fine with SDwebImage.

Undefined symbols for architecture i386:
  "_ABAddressBookCopyArrayOfAllPeople", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABAddressBookCreateWithOptions", referenced from:
      +[GPPAddressBook loadDeviceContactsWithHandler:] in GooglePlus(GPPAddressBook.o)
  "_ABAddressBookGetPersonCount", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABAddressBookRequestAccessWithCompletion", referenced from:
      +[GPPAddressBook loadDeviceContactsWithHandler:] in GooglePlus(GPPAddressBook.o)
  "_ABMultiValueCopyValueAtIndex", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABMultiValueGetCount", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABPersonCopyImageDataWithFormat", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABPersonHasImageData", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ABRecordCopyValue", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_ACAccountTypeIdentifierFacebook", referenced from:
      -[SHKiOSFacebook accountTypeIdentifier] in libShareKit.a(SHKiOSFacebook.o)
  "_ACAccountTypeIdentifierSinaWeibo", referenced from:
      -[SHKSinaWeibo accountTypeIdentifier] in libShareKit.a(SHKSinaWeibo.o)
  "_ACAccountTypeIdentifierTwitter", referenced from:
      -[SHKiOSTwitter accountTypeIdentifier] in libShareKit.a(SHKiOSTwitter.o)
  "_ACFacebookAppIdKey", referenced from:
      -[SHKiOSFacebook authorizationFormShow] in libShareKit.a(SHKiOSFacebook.o)
  "_ACFacebookAudienceEveryone", referenced from:
      -[SHKiOSFacebook authorizationFormShow] in libShareKit.a(SHKiOSFacebook.o)
  "_ACFacebookAudienceKey", referenced from:
      -[SHKiOSFacebook authorizationFormShow] in libShareKit.a(SHKiOSFacebook.o)
  "_ACFacebookPermissionsKey", referenced from:
      -[SHKiOSFacebook authorizationFormShow] in libShareKit.a(SHKiOSFacebook.o)
  "_AVURLAssetPreferPreciseDurationAndTimingKey", referenced from:
      -[SHKFile getDuration] in libShareKit.a(SHKFile.o)
  "_CMTimeGetSeconds", referenced from:
      -[SHKFile getDuration] in libShareKit.a(SHKFile.o)
  "_MPMoviePlayerThumbnailImageKey", referenced from:
      -[GPPMediaPreviewView thumbnailImageRequestDidFinish:] in GooglePlus(GPPMediaPreviewView.o)
  "_MPMoviePlayerThumbnailImageRequestDidFinishNotification", referenced from:
      -[GPPMediaPreviewView initWithFrame:mediaAttachment:] in GooglePlus(GPPMediaPreviewView.o)
      -[GPPMediaPreviewView thumbnailImageRequestDidFinish:] in GooglePlus(GPPMediaPreviewView.o)
  "_OBJC_CLASS_$_ACAccountStore", referenced from:
      objc-class-ref in libShareKit.a(SHKiOSFacebook.o)
      objc-class-ref in libShareKit.a(SHKiOSSharer.o)
  "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
      objc-class-ref in GooglePlus(NSData+GPPAdditions.o)
      objc-class-ref in GooglePlus(UIDevice+GPPAdditions.o)
      objc-class-ref in libShareKit.a(SHKPhotoAlbum.o)
  "_OBJC_CLASS_$_AVURLAsset", referenced from:
      objc-class-ref in libShareKit.a(SHKFile.o)
  "_OBJC_CLASS_$_CLLocationManager", referenced from:
      objc-class-ref in GooglePlus(UIDevice+GPPAdditions.o)
      objc-class-ref in libShareKit.a(SHKFoursquareV2VenuesForm.o)
      objc-class-ref in libShareKit.a(SHKFoursquareV2.o)
  "_OBJC_CLASS_$_CMMotionManager", referenced from:
      objc-class-ref in GooglePlus(GPPSpamSignal.o)
  "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
      objc-class-ref in GooglePlus(GPPMediaPreviewView.o)
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      objc-class-ref in libShareKit.a(EvernoteSession.o)
  "_OBJC_CLASS_$_SLComposeViewController", referenced from:
      objc-class-ref in libShareKit.a(SHKiOSSharer.o)
      objc-class-ref in libShareKit.a(SHKSinaWeibo.o)
  "_OBJC_CLASS_$_SLRequest", referenced from:
      objc-class-ref in libShareKit.a(SHKiOSFacebook.o)
      objc-class-ref in libShareKit.a(SHKiOSTwitter.o)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      -[EvernoteSession installAppWithId:withViewController:] in libShareKit.a(EvernoteSession.o)
  "_SLServiceTypeFacebook", referenced from:
      -[SHKiOSFacebook serviceTypeIdentifier] in libShareKit.a(SHKiOSFacebook.o)
      -[SHKiOSFacebook sendFeed] in libShareKit.a(SHKiOSFacebook.o)
      -[SHKiOSFacebook sendPhoto] in libShareKit.a(SHKiOSFacebook.o)
      -[SHKiOSFacebook sendVideo] in libShareKit.a(SHKiOSFacebook.o)
      -[SHKiOSFacebook fetchUserInfo] in libShareKit.a(SHKiOSFacebook.o)
  "_SLServiceTypeSinaWeibo", referenced from:
      +[SHKSinaWeibo canShare] in libShareKit.a(SHKSinaWeibo.o)
      -[SHKSinaWeibo share] in libShareKit.a(SHKSinaWeibo.o)
  "_SLServiceTypeTwitter", referenced from:
      -[SHKiOSTwitter serviceTypeIdentifier] in libShareKit.a(SHKiOSTwitter.o)
      -[SHKiOSTwitter sendStatusViaTwitter:mimeType:filename:] in libShareKit.a(SHKiOSTwitter.o)
      -[SHKiOSTwitter sendDataViaYFrog:mimeType:filename:] in libShareKit.a(SHKiOSTwitter.o)
      -[SHKiOSTwitter fetchUserInfo] in libShareKit.a(SHKiOSTwitter.o)
      -[SHKiOSTwitter downloadAPIConfiguration] in libShareKit.a(SHKiOSTwitter.o)
      -[SHKiOSTwitter authorizationYFrogHeader] in libShareKit.a(SHKiOSTwitter.o)
  "_kABPersonEmailProperty", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_kABPersonFirstNameProperty", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_kABPersonLastNameProperty", referenced from:
      ___48+[GPPAddressBook loadDeviceContactsWithHandler:]_block_invoke in GooglePlus(GPPAddressBook.o)
  "_kCLLocationAccuracyBest", referenced from:
      -[SHKFoursquareV2VenuesForm startMonitoringLocation] in libShareKit.a(SHKFoursquareV2VenuesForm.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
like image 602
mikezs Avatar asked Mar 04 '14 06:03

mikezs


2 Answers

Looks like you are missing quite a few frameworks. According to the symbols mentioned, add following list of frameworks to resolve the linker errors,

  • AddressBook.framework
  • AVFoundation.framework
  • CoreMedia.framework
  • MediaPlayer.framework
  • Accounts.framework
  • AssetsLibrary.framework
  • CoreLocation.framework
  • CoreMotion.framework
  • StoreKit.framework
  • Social.framework

Hope that helps!

like image 154
Amar Avatar answered Nov 01 '22 21:11

Amar


perhaps,just add these framework

  • AddressBook.framework
  • MediaPlayer.framework
  • AssetsLibrary.framework
  • CoreMotion.framework
like image 43
Jimmy Wang Avatar answered Nov 01 '22 20:11

Jimmy Wang