架构i386 iOS的未定义符号

问题描述 投票:1回答:1

我在尝试使用iOS图表库运行项目时发现以下错误。在iPhone5和iPad2上运行时,代码在Simulator上运行正常,但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)
ios objective-c swift ios-charts bridging-header
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.