gpt4 book ai didi

ios - iOS 中的 Coreplot 构建失败问题

转载 作者:行者123 更新时间:2023-11-28 17:52:52 25 4
gpt4 key购买 nike

在使用核心绘图库构建应用程序时,我遇到了以下问题。它在 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. 下载核心绘图库。
  2. 打开 xcode CorePlot-CocoaTouch.xcodeproj
  3. 转到项目并点击构建
  4. 现在转到 mac 中的 core plot framework 文件夹。您可以在其中看到构建文件夹。
  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. 已创建新库,现在将此库和核心 header 添加到您的项目中。
  9. 现在构建您的项目。

之后将 -ObjC 添加到其他链接器标志

关于ios - iOS 中的 Coreplot 构建失败问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26603234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com