Objective-c – symbol(s) not found for architecture armv6

armv6armv7ios4objective c

Please help me from the below error.

I am working on graphs using 3rd party framework (libIPhonecharting), every thing works fine in simulator, but when I am trying to build .app file to install in IPAD Device I get the below error message.

ignoring file
/Users/xyz/Desktop/xyzIPAD/library/4.0/Release-iphoneos/libIPhoneCharting.a,
file was built for archive which is not the architecture being linked
(armv6)

Undefined symbols for architecture armv6: "_OBJC_CLASS_$_DTCStroke",
referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_IPCBar3DChart", referenced from:
objc-class-ref in DemoBar3DChart.o "_OBJC_CLASS_$_IPCLineChart", referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_DTCDefaultCategoryDataset", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_CAP_SQUARE", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o "_OBJC_CLASS_$_IPCTitle", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_JOIN_BEVEL", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

Best Answer

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:

  • 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 to "Copy bundle resources"
  • Clean and build

It works for me thanks a lot to you

Related Topic