1

我在尝试使用 iOS 图表库运行我的项目时发现以下错误。该代码在 iPhone5 和 iPad2 上运行时在模拟器上运行良好,但在 iPhone6 及更高版本上构建失败:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$__TtC6Charts12BarChartData", referenced from:
      objc-class-ref in SMWBarChartsViewController.o
      objc-class-ref in SMWBarGraphViewController.o
  "_OBJC_CLASS_$__TtC6Charts12PieChartData", referenced from:
      objc-class-ref in SMWPieChartsViewController.o
  "_OBJC_CLASS_$__TtC6Charts15BarChartDataSet", referenced from:
      objc-class-ref in SMWBarChartsViewController.o
      objc-class-ref in SMWBarGraphViewController.o
  "_OBJC_CLASS_$__TtC6Charts15PieChartDataSet", referenced from:
      objc-class-ref in SMWPieChartsViewController.o
  "_OBJC_CLASS_$__TtC6Charts17BarChartDataEntry", referenced from:
      objc-class-ref in SMWBarChartsViewController.o
      objc-class-ref in SMWPieChartsViewController.o
      objc-class-ref in SMWBarGraphViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

1 回答 1

1

我已经能够解决这个问题。我将 arm64 包含在有效架构中。问题是我试图将这个库集成到已经存在的目标 c 项目中。早些时候是使用核心情节。所以核心绘图文件造成了问题。如果当时包含核心绘图文件,我无法将 arm64 包含在有效架构中,因为它在 iPhone6 上崩溃。所以我只是删除了核心绘图文件,一切都开始顺利进行。

于 2016-03-07T09:44:48.653 回答