2014-10-28 178 views
1

我在構建具有核心圖庫的應用程序時遇到以下問題。 它在2天前工作。但它突然停止運行。Coreplot在ios中構建失敗問題

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) 
+0

我想你會發現在這個答案的解決方案:http://stackoverflow.com/a/20266141/4177109 – tbaranes 2014-10-28 08:01:28

+0

@Ckouta謝謝您的快速回復。我提到這個鏈接,它沒有解決我的問題。 – Rakesh 2014-10-28 08:14:19

回答

0

將新的核心圖庫框架添加到您的項目中。刪除舊圖書館。這些是要遵循的步驟

  1. 下載核心圖庫。
  2. 打開的Xcode CorePlot-CocoaTouch.xcodeproj
  3. 轉到項目,並單擊構建
  4. 現在去的核心情節框架文件夾中的MAC。你可以在那看到build文件夾。
  5. 現在打開終端,並給你的核心繪路徑
  6. CD CorePlot_1.4 /來源/建設/
  7. 類型脂-create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot -CocoaTouch.a -output core_plot_all.a
  8. 已創建新庫,現在將此庫和核心標題添加到項目中。
  9. 現在建立你的項目。

之後-ObjC添加到其他連接標誌