Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6986907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:52:07+00:00 2026-05-27T18:52:07+00:00

I have an XCode 4.2 workspace containing a Cocos Touch Static Library (mixed Objective

  • 0

I have an XCode 4.2 workspace containing a Cocos Touch Static Library (mixed Objective C, Objective C++ and C++) and a cocos2d iOS app. The static library and the iOS app are both siblings.

The problem is the app’s linker fails when trying to link to the functions and classes in the static library. The app does have the static library set with “Link Binary With Libraries”. It is as though the functions and classes in the static lib are either not being exported or not being looked for by the app.

For example I created a function int foo() { return 42; } and placed it in the library, then called it from main.m in the app.

The error looks like this:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_RootViewController", referenced from:
    objc-class-ref in AppDelegate.o
  "_foo", referenced from:
    _main in main-972D78D1B1575F1.o
  "_OBJC_CLASS_$_CCDirector", referenced from:
    objc-class-ref in AppDelegate.o
    objc-class-ref in libCocos2DBase.a(BaseScene.o)
    objc-class-ref in libCocos2DBase.a(Director.o)
  "_OBJC_CLASS_$_CCLayer", referenced from:
    _OBJC_CLASS_$_FoundationLayer in libCocos2DBase.a(BaseScene.o)
  "_OBJC_METACLASS_$_CCLayer", referenced from:
    _OBJC_METACLASS_$_FoundationLayer in libCocos2DBase.a(BaseScene.o)
  "_OBJC_CLASS_$_CCTexture2D", referenced from:
    objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_EAGLView", referenced from:
    objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_CCScene", referenced from:
    objc-class-ref in libCocos2DBase.a(BaseScene.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

Thank you so much for anybody that can help, I’m new to XCode and have spent a lot of time looking for a solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:52:07+00:00Added an answer on May 27, 2026 at 6:52 pm

    It looks like your static library was not compiled for the armv7 architecture, whereas the app using it is, so it can’t find the proper symbols. Try compiling the static library for armv7 (or if you don’t have the source, see if you can get the developer to compile it for armv7).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Xcode project with several static library dependancies set up in the
I have two projects in an Xcode workspace. I would like to add the
I have downloaded xcode and have developed a crud app (on the iphone) that
I have Xcode 4.2 and whenever I run my app in the simulator and
I have a project containing cocos2d framework, sharekit, asi & json. I've noticed that
I have two projects in a Xcode 4 workspace. Then, I drag a new
In Xcode 4 I want to use the workspace to have multiple project types
I have an Xcode project (for an iPhone application) that uses cocos2d. I have
Is there a best practice for importing static library headers in Xcode 4? Most
I have xCode 4.2, and I've done all the steps about the $99 ios

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.