在ios中Coreplot构建失败的问题

时间:2014-10-28 07:51:29

标签: ios iphone core-plot

使用核心绘图库构建应用程序时,我遇到以下问题。 它在2天前工作。但它突然停止了运行。

libCorePlot-CocoaTouch.a (2 slices)
Undefined symbols for architecture x86_64:
  "_CPTDecimalFromFloat", referenced from:
      -[GraphView generateLayout] in GraphView.o
  "_CPTDecimalFromInt", referenced from:
      -[GraphView generateLayout] in GraphView.o
  "_OBJC_CLASS_$_CPTAxisLabel", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTBarPlot", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTColor", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTConstraints", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTFill", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
      _OBJC_CLASS_$_GraphView in GraphView.o
  "_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTPlotRange", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_CLASS_$_CPTXYGraph", referenced from:
      objc-class-ref in GraphView.o
  "_OBJC_METACLASS_$_CPTGraphHostingView", referenced from:
      _OBJC_METACLASS_$_GraphView in GraphView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:-1)

将新的核心图库框架添加到您的项目中。删除旧库。这些是要遵循的步骤

  1. 下载核心图库。
  2. 打开xcode CorePlot-CocoaTouch.xcodeproj
  3. 转到项目并点击构建
  4. 现在转到mac中的核心情节框架文件夹。您可以在其中看到构建文件夹。
  5. 现在打开终端并提供核心情节路径
  6. cd CorePlot_1.4 / Source / build /
  7. 输入lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
  8. 创建了新库,现在将此库和核心标题添加到您的项目中。
  9. 现在构建您的项目。
  10. 之后将-ObjC添加到其他链接器标志