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 7778859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:30:14+00:00 2026-06-01T18:30:14+00:00

I’m having some problems with my iPhone app not linking for the iPhone Simulator.

  • 0

I’m having some problems with my iPhone app not linking for the iPhone Simulator. It tells me there are undefined symbols:

Undefined symbols for architecture i386:
  ".objc_class_name_NSRunLoop", referenced from:
      pointer-to-literal-objc-class-name in SampleBrowser.cpp.o
  ".objc_class_name_NSDate", referenced from:
      pointer-to-literal-objc-class-name in SampleBrowser.cpp.o
  ".objc_class_name_NSAutoreleasePool", referenced from:
      pointer-to-literal-objc-class-name in SampleBrowser.cpp.o
      pointer-to-literal-objc-class-name in libRenderSystem_GLES2Static.a(OgreEAGL2Window.mm.o)
  ".objc_class_name_UIApplication", referenced from:
      pointer-to-literal-objc-class-name in SampleBrowser.cpp.o
      pointer-to-literal-objc-class-name in libOIS.a(iPhoneInputManager.mm.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_AppDelegate in SampleBrowser.cpp.o
  ".objc_class_name_UIView", referenced from:
      .objc_class_name_SampleBrowserGestureView in SampleBrowser.cpp.o
      .objc_class_name_InputDelegate in libOIS.a(iPhoneInputManager.mm.o)
      .objc_class_name_EAGL2View in libRenderSystem_GLES2Static.a(OgreEAGL2View.mm.o)
  ".objc_class_name_UIScreen", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(iPhoneInputManager.mm.o)
      pointer-to-literal-objc-class-name in libRenderSystem_GLES2Static.a(OgreEAGL2Support.mm.o)
  ".objc_class_name_UIAccelerometer", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(iPhoneInputManager.mm.o)
      pointer-to-literal-objc-class-name in libOIS.a(iPhoneAccelerometer.mm.o)

But these looks like the names of Objective-C classes from frameworks which I AM linking against. I wanted to do some digging around so I used nm to look at the symbol list of the frameworks I’m linking against. For instance

josh$ nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation -arch i386 -g | grep objc_class
001a4500 S $ld$add$os10.4$.objc_class_name_NSArray
001a4501 S $ld$add$os10.4$.objc_class_name_NSCalendar
001a4502 S $ld$add$os10.4$.objc_class_name_NSData
001a4503 S $ld$add$os10.4$.objc_class_name_NSDate
001a4504 S $ld$add$os10.4$.objc_class_name_NSDateComponents
001a4505 S $ld$add$os10.4$.objc_class_name_NSDictionary
001a4506 S $ld$add$os10.4$.objc_class_name_NSEnumerator
001a4507 S $ld$add$os10.4$.objc_class_name_NSException
001a4508 S $ld$add$os10.4$.objc_class_name_NSInputStream
001a4509 S $ld$add$os10.4$.objc_class_name_NSInvocation
001a450a S $ld$add$os10.4$.objc_class_name_NSLocale
001a450b S $ld$add$os10.4$.objc_class_name_NSMethodSignature
001a450c S $ld$add$os10.4$.objc_class_name_NSMutableArray
001a450d S $ld$add$os10.4$.objc_class_name_NSMutableData
001a450e S $ld$add$os10.4$.objc_class_name_NSMutableDictionary
001a450f S $ld$add$os10.4$.objc_class_name_NSMutableSet
001a4510 S $ld$add$os10.4$.objc_class_name_NSNull
001a4511 S $ld$add$os10.4$.objc_class_name_NSObject
001a4512 S $ld$add$os10.4$.objc_class_name_NSOutputStream
001a4513 S $ld$add$os10.4$.objc_class_name_NSRunLoop
001a4514 S $ld$add$os10.4$.objc_class_name_NSSet
001a4515 S $ld$add$os10.4$.objc_class_name_NSStream
001a4516 S $ld$add$os10.4$.objc_class_name_NSTimeZone
001a4517 S $ld$add$os10.4$.objc_class_name_NSTimer
001a4548 S $ld$add$os10.4$.objc_class_name_NSURL
001a4518 S $ld$add$os10.4$.objc_class_name_NSUserDefaults
001a4549 S $ld$add$os10.5$.objc_class_name_NSURL
001a454a S $ld$hide$os10.4$.objc_class_name_NSFileWrapper
001a454b S $ld$hide$os10.5$.objc_class_name_NSFileWrapper
001a454c S $ld$hide$os10.6$.objc_class_name_NSFileWrapper

Now, this symbol list makes it look to me like that framework archive IS exporting the classes that the linker is looking for. The only thing that’s different is this $ld$add$os10.4$ prefix. I’m wondering why it’s there, what it means, and is that, perhaps, causing my problem?

Edit:
Looks like this was my problem:
Link errors in Xcode when targeting iPhoneSimulator

In short, leaving off the compiler flag -fobjc-abi-version=2 leads to the different symbol naming.

  • 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-06-01T18:30:16+00:00Added an answer on June 1, 2026 at 6:30 pm

    $ld$add$osXX.X$SYMBOL is a linker directive that allows one to redirect symbol resolution in a library. The command sits in the __DATA section of a binary and is parsed by ld at link time to change the visibility of exported symbols. The linker on OS X actually accepts quite a few different kinds of these commands:

    $ld$hide$osXX.X$SYMBOL Adds that symbol to the ignore set. The Linker will no longer export that symbol to any binaries that link with the library even though it may have global visibility.

    $ld$add$osXX.X$SYMBOL Adds that symbol to the binary at link time regardless of whether a definition exists.

    $ld$install_name$osXX.X Redirects the definition of a symbol in a particular binary to another binary. This is used to work around an issue in OS X where CoreGraphics used to exist as a sub-framework of ApplicationServices. All symbols are now redirected around to the proper framework.

    $ld$compatibility_version Forces compatibility with earlier versions of the Linker.

    In your case, you’ve bumped up against a compatibility issue in Foundation. OS X exported NSFileWrapper in AppKit until 10.7 when the symbol was hidden from there and moved to Foundation. Normally, this means the author of AppKit would hide the _OBJC_CLASS_$, _OBJC_METACLASS_$, and _OBJC_IVAR_$ parts of a class definition to make the linker look elsewhere for that symbol. However, because you removed the -fobjc-abi-version flag the compiler defaults back to the old 1.x ABI which only requires the hiding and finding of a .objc_class_name which probably don’t exist in the binary you’re trying to link.

    As for your undefined symbols, it’s a simple file extension issue. .cpp are c++ only files, (which means no NSRunloop, MSMutableArray, NSObject, etc). If you wish to access these objects, rename the offending files with the extension .mm, which is a standard objC++ file. It’s also a good idea to link against and import QuartzCore (for EAGL2View) and UIKit (for UIScreen and friends along with UIAccelerometer).

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload

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.