微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ios – 文件libCorePlot-CocoaTouch.a中缺少必需的架构x86_64

根据 Ray Wenderlich tutorial,我做了以下工作:

步骤1 – 我在官方网站上下载了CorePlot_1.4.zip

步骤2 – 我添加到我的项目的CorePlotHeaders文件夹和名为libCorePlot-CocoaTouch.a的静态库(检查“将项目复制到目标组的文件夹(如果需要)”)

步骤3 – 我添加到其他链接器标志字段以下:-ObjC

步骤4 – 如果libCorePlot-CocoaTouch.a和QuartzCore框架在这里,我检查了Link Binary与Libraries

结果:当我编译我的项目时,当我使用Iphone Retina(4-Inch)时它工作正常。但是当我使用Iphone Retina(4英寸64位)
当我尝试构建和运行时,我收到以下消息:

ld:warning:忽略文件/blah/blah/libCorePlot-CocoaTouch.a,文件/blah/blah/libCorePlot-CocoaTouch.a中缺少必需的体系结构x86_64(3片)

这里完整的信息:

ld: warning: ignoring file /Users/me/Desktop/project/libCorePlot-CocoaTouch.a,missing required architecture x86_64 in file /Users/me/Desktop/project/libCorePlot-CocoaTouch.a (3 slices)
Undefined symbols for architecture x86_64:
"_CPTDecimalFromCGFloat",referenced from:
  -[PatientConstanteVisualiser configurePlots] in PatientConstanteVisualiser.o
  -[PatientConstanteVisualiser configureAxes] in PatientConstanteVisualiser.o
"_CPTDecimalFromInteger",referenced from:
  -[PatientConstanteVisualiser configureAxes] in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTAxisLabel",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTColor",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTFill",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTMutableLineStyle",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTMutableTextStyle",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTPlotSymbol",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTScatterPlot",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTTheme",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_OBJC_CLASS_$_CPTXYGraph",referenced from:
  objc-class-ref in PatientConstanteVisualiser.o
"_kCPTStocksTheme",referenced from:
  -[PatientConstanteVisualiser configureGraph] in PatientConstanteVisualiser.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我在这个问题上度过了几个小时…请帮助…

解决方法

如果您想要64位版本的Core Plot,则必须构建一个新版本的静态库。 Arm64构建需要iOS 7,但Core Plot也支持早期版本,因此预制库仅为32位。

打开CorePlot-CocoaTouch.xcodeproj并将体系结构设置更改为“标准体系结构(包括64位)”。或者构建“通用库”目标,并将生成的静态库替换为Core Plot 1.4附带的静态库,或者使用依赖项目设置。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐