简体   繁体   English

iOS中的Coreplot构建失败问题

[英]Coreplot build failed issue in ios

I am facing the following issue while building the application with core plot library. 使用核心图库构建应用程序时,我面临以下问题。 It was working before 2 days. 它在2天前开始工作。 But it suddenly stopped running. 但是它突然停止运行。

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)

Add new core plot library framework to your project. 向您的项目添加新的核心图库框架。 Remove the old library. 删除旧库。 These are the steps to follow 这些是要遵循的步骤

  1. Download the core plot library. 下载核心图库。
  2. open the xcode CorePlot-CocoaTouch.xcodeproj 打开xcode CorePlot-CocoaTouch.xcodeproj
  3. Go to project and click on build 转到项目并单击构建
  4. Now go to core plot framework folder in your mac. 现在转到Mac中的核心绘图框架文件夹。 You can see build folder in that. 您可以在其中看到构建文件夹。
  5. Now open the terminal and give your core plot path 现在打开终端并给出您的核心绘图路径
  6. cd CorePlot_1.4/Source/build/ cd CorePlot_1.4 / Source / build /
  7. Type lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a 键入lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
  8. New library created and now add this library and core headers to your project. 创建新库,现在将此库和核心头添加到您的项目中。
  9. Now build your project. 现在构建您的项目。

After that add -ObjC to other linker flags 之后,将-ObjC添加到其他链接器标志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM