`
zani
  • 浏览: 350098 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

CorePlot 安装

阅读更多

一 第一种安装方法:

1.从http://code.google.com/p/core-plot/downloads/list下载CorePlotInstaller_xxx.zip, 下载后解压并安装,  会将SDK默认安装在/Library/SDKs/CorePlotSDK/目录下.

 

2. 安装后, 在/Library/SDKs/CorePlotSDK/下有两个文件夹iphoneos.sdk和iphonesimulator.sdk, 可见一个是用于真机, 另外一个是用于模拟器. 现在我们用lipo命令将两个静态库合并: 

 打开命令行 Terminal.app 输入:

 lipo -create

 然后依次把两个.a文件拖到终端窗口, 命令行会变成这样:

 lipo -create /Library/SDKs/CorePlotSDK/iphoneos.sdk/usr/lib/libCorePlot.a    /Library/SDKs/CorePlotSDK/iphonesimulator.sdk/usr/lib/libCorePlot.a

然后接着输入 -output 目标文件路径,如:

-output /Users/keesuper/Test/Core_Plot_Test/coreplot/lib/libCorePlotAll.a

最后现在这样一条命令:

lipo -create /Library/SDKs/CorePlotSDK/iphoneos.sdk/usr/lib/libCorePlot.a  /Library/SDKs/CorePlotSDK/iphonesimulator.sdk/usr/lib/libCorePlot.a -output /Users/keesuper/Test/Core_Plot_Test/coreplot/lib/libCorePlotAll.a

好了,回车,这样就会生成通用的静态库.

3. 将

/Library/SDKs/CorePlotSDK/iphoneos.sdk/usr/下的include目录复制到/Users/keesuper/Test/Core_Plot_Test/coreplot/目录下.

 

 

4. Xcode->Project->Edit Project Settings,打开你的工程配置,点击Bulids标签, 将Configuration设置成All Configuration, 在: Header Search Paths里添加"./coreplot/include"; Library Search  Paths里添加"./coreplot/lib". 在other link flags里添加"-ObjC -all_load -lCorePlotAll"

 

 

 

二 第二种安装方法:

1. 下载并安装Mercurial(很简单,在http://www.selenic.com/mercurial/wiki/ 有标准Mac安装包下载),再使用命令:

hg clone http://core-plot.googlecode.com/hg/ core-plot

即可把Core Plot项目源代码下载到指定目录core-plot下。

 



2. 将下载好了的源码复制到工程目录下, 

     Add->Existing Files…,把CorePlot-CocoaTouch.xcodeproj添加到新项目中

 

3. 选择Target “get info->General”,添加对项目CorePlot-CocoaTouch的依赖(引用),(点击Linked Library上的"+"号).

 

4.选择新项目的“get info->Build”,在“User Header Search Paths”中添加Core Plot头文件搜索路径,如:/Users/kmyhy/core-plot/framework。注意要选中“Recursive”小勾.

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics