Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: Undefined symbols for architecture arm64 error

In my Xcode 5 project I use RestKit for REST communication. Everything works fine with the simulators, but generating the ipa file, I get the following error:

ld: warning: ignoring file /Users/joseph/Library/Developer/Xcode/DerivedData/XXXXXXXXXX-gdwdekevxtdfivfpsnmyykeqhulk/Build/Products/Debug-iphoneos/libRestKit.a, missing required architecture arm64 in file /Users/joseph/Library/Developer/Xcode/DerivedData/XXXXXXXXXXXXX-gdwdekevxtdfivfpsnmyykeqhulk/Build/Products/Debug-iphoneos/libRestKit.a (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RKRelationshipMapping", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKObjectMapping", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKRequestDescriptor", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKObjectManager", referenced from:
      objc-class-ref in classname-xxx.o
  "_OBJC_CLASS_$_RKResponseDescriptor", referenced from:
      objc-class-ref in classname-xxx.o

  "_RKStatusCodeIndexSetForClass", referenced from:
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
      -[classname-xxx classname-Method] in classname-xxx.o
  "_RKMIMETypeJSON", referenced from:
      -[classname-xxxinitWithURLBase:timeOut:] in classname-xxx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation).

If in RestKit project, I change in "Build Settings" -> "Architectures" the "Standard architectures (ARMv7, armv7s)" by Standard architectures (including 64-bit) (ARMv7, armv7s, arm64) option, everything compiles fine . Is this correct?, Does not bring any result, I have to change some other settings.

like image 969
José Miguel Rodríguez García Avatar asked Jan 04 '14 20:01

José Miguel Rodríguez García


3 Answers

  1. Select Restkit project
  2. Set the Build Active Architecture Only to No

Build Active Architecture Only

like image 77
Js Lim Avatar answered Oct 01 '22 03:10

Js Lim


It just means you are building your project also for 64bit (iPhone 5s) and nothing to worry about, see this link for some more explanations: Xcode 5 and iOS 7: Architecture and Valid architectures

like image 24
Refael.S Avatar answered Oct 01 '22 02:10

Refael.S


Just change in RestKit project -> Build Settings -> Architectures to Standard Architecture (armv7, armv7s, arm64). After that everything should work.

like image 25
lukszar Avatar answered Oct 01 '22 04:10

lukszar