xcode 4.5 : Undefined symbols for architecture armv7s:
Asked Answered
A

3

6

i'm totally went crazy for that issue.. i have project that was working fine but after i added facebook sdk it gives me the following errors (errors that made me remove armv6 hoping it will work fine after but it gives more issue as i'm going through it.. i'm using now arch armv7 and armv7s together and that is the error it gives

/Users/ME/Library/Developer/Xcode/DerivedData/Cocktail-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/Cocktail.build/Debug-iphoneos/Cocktail.build/Objects-normal/armv7/Cocktail normal armv7 cd "/Users/ME/Apple DistributedApps/Cocktail All/Cocktail" setenv IPHONEOS_DEPLOYMENT_TARGET 4.3 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Products/Debug-iphoneos "-L/Users/ME/Apple DistributedApps/MyProj All/MyProj" -F/Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Products/Debug-iphoneos "-F/Users/ME/Apple DistributedApps/MyProj All/MyProj" -filelist /Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/MyProj.build/Debug-iphoneos/MyProj.build/Objects-normal/armv7/MyProj.LinkFileList -dead_strip -ObjC -all_load -lxml2 -lsqlite3.0 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -framework AdSupport -framework Social -framework SystemConfiguration -framework MapKit -framework CoreLocation -framework Twitter -framework AssetsLibrary -framework MobileCoreServices -framework CoreVideo -framework CoreMedia -lz -lsqlite3.0 -framework AddressBook -framework CFNetwork -framework CoreFoundation -framework Security -framework iAd -framework MessageUI -framework QuartzCore -framework AudioToolbox -framework MediaPlayer -framework AVFoundation -framework CoreGraphics -framework UIKit -framework Foundation -framework FacebookSDK -framework RevMobAds -lFlurryAnalytics -o /Users/ME/Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/MyProj.build/Debug-iphoneos/MyProj.build/Objects-normal/armv7/MyProj

    Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_ACAccountStore", referenced from:
      objc-class-ref in FacebookSDK(FBSession.o)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      -[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
  "_ACFacebookAudienceFriends", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      objc-class-ref in RevMobAds(RevMobStoreController.o)
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in NewsViewController.o
      objc-class-ref in SportsViewController.o
      objc-class-ref in LecViewController.o
      objc-class-ref in AccViewController.o
      objc-class-ref in JokesViewController.o
      objc-class-ref in GamesViewController.o
      objc-class-ref in CaricViewController.o
      ...
  "_ACFacebookAppIdKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_ACAccountTypeIdentifierFacebook", referenced from:
      +[FBSession renewSystemAuthorization] in FacebookSDK(FBSession.o)
  "_ACFacebookAudienceKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_ACFacebookAudienceOnlyMe", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_kGADAdSizeSmartBannerPortrait", referenced from:
      -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o
      -[SportsViewController viewDidLoad] in SportsViewController.o
      -[LecViewController viewDidLoad] in LecViewController.o
      -[AccViewController viewDidLoad] in AccViewController.o
      -[JokesViewController viewDidLoad] in JokesViewController.o
      -[GamesViewController viewDidLoad] in GamesViewController.o
      -[CaricViewController viewDidLoad] in CaricViewController.o
      ...
  "_OBJC_CLASS_$_GADRequest", referenced from:
      objc-class-ref in NewsViewController.o
      objc-class-ref in SportsViewController.o
      objc-class-ref in LecViewController.o
      objc-class-ref in AccViewController.o
      objc-class-ref in JokesViewController.o
      objc-class-ref in GamesViewController.o
      objc-class-ref in CaricViewController.o
      ...
  "_ACFacebookPermissionsKey", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
  "_CGSizeFromGADAdSize", referenced from:
      -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o
      -[SportsViewController viewDidLoad] in SportsViewController.o
      -[LecViewController viewDidLoad] in LecViewController.o
      -[AccViewController viewDidLoad] in AccViewController.o
      -[JokesViewController viewDidLoad] in JokesViewController.o
      -[GamesViewController viewDidLoad] in GamesViewController.o
      -[CaricViewController viewDidLoad] in CaricViewController.o
      ...
  "_ACFacebookAudienceEveryone", referenced from:
      -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Alumna answered 14/10, 2012 at 12:19 Comment(8)
You seem to use a pre-compiled static library that doesn't contain an armv7s slice. The text you pasted doesn't contain an error, you should give us the right output.Elaterium
sorry i've edit it to show the errorsAlumna
Ok, so it's the Facebook SDK. Do you use a compiled library (something like facebook.a), or directly the FB SDK source files ? If you use the source files, you should clean & build your project again. If not, you should use the source files.Elaterium
i'm using FacebookSDK.framework and i've made a clean and clean build folder but nothing happenedAlumna
ok i've added (account.framework) and all facebook errors have gone.. now i have problems of admob and revmob ..now what?Alumna
This is a huge problem with libraries that you manually include. You should think about integrating CocoaPod, it would be a relief.Elaterium
problem solved here: #13622099Caboodle
You need to add StoreKit.framework to solve problems with AdmobSupat
S
2

Facebook sdk isn't compiled for armv7s, but you can compile yourself

Look at Liam nichols answer here

https://developers.facebook.com/bugs/107674376052717/

Download a copy of the source code from the git hub page (facebook git hub) Open up the xcode project and in the build settings change the architecture to armv7, armv7s Close the project Navigate to /scripts and in terminal run ./build_all.sh When it finish compiling, you can find the framework in builds/FacebookSDK.framework

Setter answered 14/10, 2012 at 13:50 Comment(0)
G
4

As an interim solution you can remove armv7s from the Architectures in the Xcode project. Change "$(ARCHS_STANDARD_32_BIT)" to "armv7". When the libraries are updated change back to re-add armv7s support.

Gilgai answered 14/10, 2012 at 14:8 Comment(0)
S
2

Facebook sdk isn't compiled for armv7s, but you can compile yourself

Look at Liam nichols answer here

https://developers.facebook.com/bugs/107674376052717/

Download a copy of the source code from the git hub page (facebook git hub) Open up the xcode project and in the build settings change the architecture to armv7, armv7s Close the project Navigate to /scripts and in terminal run ./build_all.sh When it finish compiling, you can find the framework in builds/FacebookSDK.framework

Setter answered 14/10, 2012 at 13:50 Comment(0)
S
0

Remove armv7s from valid architectures section and it will work.

Build Settings --> Architectures --> Valid Architectures

Xcode Build Settings

Shove answered 28/2, 2014 at 16:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.