【问题标题】:Why am I seeing the following linker errors when building an iPhone app with Core Plot?为什么在使用 Core Plot 构建 iPhone 应用程序时看到以下链接器错误?
【发布时间】:2011-05-23 13:27:59
【问题描述】:

在构建使用 Core Plot 框架的 iPhone 应用程序时,我看到以下链接器错误:

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

在 Xcode 3.x 下,我能够成功构建这个项目,但在 Xcode 4 中,它在定位设备时会出现上述错误(模拟器仍然可以正确构建)。

什么可能导致这些错误,我该如何解决?

【问题讨论】:

    标签: iphone ios xcode cocoa-touch core-plot


    【解决方案1】:

    我可以解决我的问题

    更改构建设置,

    架构:标准(armv6,armv7)

    仅构建活动架构:是的。

    【讨论】:

      【解决方案2】:

      清理您的项目,库之间似乎存在不匹配,因此链接不起作用。

      【讨论】:

      • 我也试过了,但它仍然无法正常工作并给出同样的错误
      • 我也遇到同样的问题,求解决办法
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-06
      • 2019-08-06
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      相关资源
      最近更新 更多