Undefined symbols for architecture armv6, Updating to iOS 4.3

16,981

Solution 1

For this type of error, this is what I typically see:

 Undefined symbols for architecture armv6:
  "_OBJC_CLASS_$_MyCustomController", referenced from:
      objc-class-ref in SomeOtherController.o
ld: symbol(s) not found for architecture armv6

Almost every time I see this error it is caused by hidden/invisible characters in the import statement in SomeOtherController.h or SomeOtherController.m. So, look at both your .h and .m file, find the line that looks like this:

#import "MyCustomController.h"

Delete this line and retype it (do not copy/paste it -- you'll just repaste the offending hidden character).

Solution 2

Here's how I got this problem:

I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.

My solution for this problem:

enter image description here

  • Click on the Project icon
  • Go to the Target in the navigator menu
  • Click on the "Build Phases" tab
  • Add the .m file to "Compile Sources" (either drag it across, or use the + button)
  • Add the .xib or Storyboard file to "Copy bundle resources"
  • Clean and build

Solution 3

Click on your Project name in the navigation window, choose the target you're building against, go to build phases, make sure the one Xcode's telling you that's missing is in there.

Solution 4

I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.

You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Release' option to 'Yes'.

This solved my problem - I hope it helps you, too! :)

Share:
16,981
Ompah
Author by

Ompah

iPhone/iPad developer

Updated on July 27, 2022

Comments

  • Ompah
    Ompah almost 2 years

    I am patching upp an application from iOS 4.2 to 4.3 using new xcode4. With no changes made, except setting iOS to 4.3, I created entitlements and go!

    Message I get is:

    Undefined symbols for architecture armv6:"function", referenced from:
    

    Ive tried to Clean the project, reinstalling xcode. I uninstalled also the xcode4 demo version. I also tried to set to Optimized armv7.

    I would be very happy for some help, I'm stuck. Really.

    Thanks very much in advance!

  • raidfive
    raidfive almost 13 years
    I've also came across this exact issue when I wasn't including some files in the specific build target.
  • Ben Baron
    Ben Baron almost 13 years
    @raidfive: THANK YOU!! I was having this same issue, and it was caused because for some reason Xcode in it's infinite wisdom decided not to place the .m files for a couple classes into the Compile Sources section of my target. Added them manually and it compiled fine.
  • Vivek2012
    Vivek2012 about 12 years
    @Answerbot Thanks for your this solution but its not working for me . I got error like this Undefined symbols for architecture armv6: "_OBJC_CLASS_$_CLLocationManager", referenced from: objc-class-ref in MyCLController.o .. Need to solve it urgent .. I have also remove that heder file #import <CoreLocation/CoreLocation.h> ..
  • NicTesla
    NicTesla almost 12 years
    @Vivek2012: I guess you probably need to add the CoreLocation Framework to your project