Christina_Infinidy
Christina_Infinidy

Reputation: 31

Xcode 4.6 Undefined symbols for architecture armv7 associate with static library

I currently run into a problem after I updated my xcode to 4.6.

At the beginning, I got lots of linking errors. With the help from other posts, I am be able to solve them. However, new problems always come whenever I solved the previous one.

Right now, I am stuck at "Undefined symbols for architecture armv7" when I try to build the game on devices with release mode (release and debug modes work for simulator, and debug mode works for devices). I have already researched this problem online, but none of the solutions could solve my situation. That's why I want to start a new post.

Let me explain the situation in details:

  1. All the errors are happened at calling methods in libraries.
  2. my libraries works fine with architecture armv7 before (xcode 4.5)
  3. The current value for Architectures in project file is "Standard (armv7, armv7s)
  4. The current value for Current Architecture is "armv7 armv7s armv6"

This is a sample error:

Even though I only showed errors related to libReceiptVerification.multi.a, errors actually happen at other libraries.

//************* From this line **************

Undefined symbols for architecture armv7:

"_OBJC_CLASS_$_NSMutableOrderedSet", referenced from: objc-class-ref in libarclite_iphoneos.a(arclite.o)

"_CFStringCreateWithBytes", referenced from: -[JKSerializer serializeObject:options:encodeOption:block:delegate:selector:error:] in libReceiptVerification.multi.a(JSONKit.o) _jk_cachedObjects in libReceiptVerification.multi.a(JSONKit.o)

"_CFStringCreateWithBytesNoCopy", referenced from: -[JKSerializer serializeObject:options:encodeOption:block:delegate:selector:error:] in libReceiptVerification.multi.a(JSONKit.o)

"_CFDataSetLength", referenced from: __NSStringObjectFromJSONString in libReceiptVerification.multi.a(JSONKit.o)

// *************** Ending Here ***********

So, does anyone has any clue on this problem? Thanks for your help in advance.

Upvotes: 2

Views: 1944

Answers (2)

Harshal Chaudhari
Harshal Chaudhari

Reputation: 710

I am having the same problem Solved by setting

Implicitly link Objective-C Runtime Support to NO

You can find it under Project->Build Settings->Apple LLVM Compiler 4.2-Language.

Or search for Implicitly link Objective-C Runtime Support in project->Build Settings

Upvotes: 1

Michael Dautermann
Michael Dautermann

Reputation: 89549

Check out the library targets for libarclite, JSONKit and everything else and make sure they also have the identical architecture values set for their Release builds.

Also that "Build Active Architecture Only" is checked to NO for Release targets.

Upvotes: 0

Related Questions