我在尝试使用 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)