Why am I seeing the following linker errors when building an iPhone app with Core Plot?
Asked Answered
W

2

7

When building an iPhone app that uses the Core Plot framework, I am seeing the following linker errors:

ld: warning: ignoring file /Users/taxtmart5/Library/Developer/Xcode/DerivedData/Solagen_Calculator-cwvwcdlnuukfftakggygqoczxyuy/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch.a, file was built for archive which is not the architecture being linked (armv6)
Undefined symbols for architecture armv6:
  "_OBJC_CLASS_$_CPPlotRange", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPXYGraph", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPLineStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTextStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPAxisLabel", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPBarPlot", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_CPDecimalFromString", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPColor", referenced from:
      objc-class-ref in PlotItem.o
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPMutableTextStyle", referenced from:
      objc-class-ref in PlotItem.o
  "_OBJC_CLASS_$_CPFill", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPGraphHostingView", referenced from:
      objc-class-ref in PlotItem.o
  "_CPDecimalFromFloat", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_kCPPlainWhiteTheme", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTheme", referenced from:
      objc-class-ref in VerticalBarChart.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

Under Xcode 3.x, I was able to build this project successfully, but with Xcode 4 it gives the above errors when targeting the device (the Simulator still builds correctly).

What could be causing these errors, and how can I fix them?

Willett answered 23/5, 2011 at 13:27 Comment(0)
W
9

I could solve my problem by

making change in build settings,

architecture :standard (armv6,armv7)

Build active architecture only : Yes.

Willett answered 24/5, 2011 at 7:13 Comment(0)
C
0

Clean your project, it appears there is a mismatch between libraries and so link does not work.

Charry answered 23/5, 2011 at 13:51 Comment(2)
i tried with that also but it is still not working and giving same errorWillett
I am also getting same problem, any solution pleaseGomorrah

© 2022 - 2024 — McMap. All rights reserved.