Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture armv6, Updating to iOS 4.3

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!

like image 778
Ompah Avatar asked Mar 23 '11 10:03

Ompah


2 Answers

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
like image 148
nevan king Avatar answered Oct 23 '22 16:10

nevan king


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).

like image 10
memmons Avatar answered Oct 23 '22 16:10

memmons