Erz*_*iel 19 iphone xcode core-plot ios xcode5
根据Ray Wenderlich教程,我做了以下工作:
第1步 -我在官方网站上下载了 CorePlot_1.4.zip
第2步 -我在我的项目中添加了 CorePlotHeaders文件夹和名为libCorePlot-CocoaTouch.a的静态库(选中 "将项目复制到目标组的文件夹(如果需要)")
第3步 -我将以下内容添加到 Other Linker Flags字段中: -ObjC
第4步 -如果 libCorePlot-CocoaTouch.a和 QuartzCore框架在这里,我检查了 Link Binary和Libraries
结果:当我编译我的项目时,它在我使用 Iphone Retina(4英寸)时工作正常.但是当我使用 Iphone Retina(4英寸64位) 时,我在尝试构建和运行时收到以下消息:
ld: warning: ignoring file /blah/blah/libCorePlot-CocoaTouch.a, missing required architecture x86_64 in file /blah/blah/libCorePlot-CocoaTouch.a (3 slices)
这里有完整的信息:
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)
Run Code Online (Sandbox Code Playgroud)
我在这个问题上花了几个小时...请帮忙......
Eri*_*och 19
如果您需要64位版本的Core Plot,则必须构建新版本的静态库.Arm64版本需要iOS 7,但Core Plot也支持早期版本,因此预构建的库仅为32位.
打开CorePlot-CocoaTouch.xcodeproj并将体系结构设置更改为"标准体系结构(包括64位)".构建"通用库"目标并包含生成的静态库来代替Core Plot 1.4附带的静态库,或者使用依赖项目设置.
Iva*_*hev 13
尝试:
lipo -info libCorePlot-CocoaTouch.a
Run Code Online (Sandbox Code Playgroud)
它显示该库是为armv7,armv7s和i386(32位模拟器)而构建的,并且不包括64位模拟器.你必须为64位模拟器构建lib,之后你可以使用lipo将64位lib添加到libCorePlot-CocoaTouch.a.
输出:
Architectures in the fat file: libCorePlot-CocoaTouch.a are: armv7 armv7s i386
Run Code Online (Sandbox Code Playgroud)
PS:它也无法在iPhone 5S上运行(没有arm64).
编辑:
以下是为了生成包含arm64和x86_64体系结构的二进制文件而需要执行的步骤:
| 归档时间: |
|
| 查看次数: |
27885 次 |
| 最近记录: |