iphone - 在 xcode 4.x 中添加静态库的 header 搜索路径困惑?

标签 iphone ios xcode ipad xcode4.5

我对在 xcode 4.5 中添加核心图静态库感到困惑。它不同于 xcode 3.x 版本。我尝试了很多东西,它给出了未找到的头文件和链接器错误。

我已按照以下步骤操作。在这种情况下,我们必须在 Header 搜索路径中使用递归。如果有人做错了,请帮助?

1)Adding coreplot library and its headers in Xcode project.(ticked for copy locally)

2)converted compiler to LLVM GCC 4.2 in project build settings.(not in target build setting)

3)Compiler for thumb will be "NO"

4)Added Header Search Path in project build settings as ,with recursive "$(SRCROOT)/Libs/CorePlot/CorePlotHeaders"

5)Added Header Search Path in target build settings as $(inherited)

6)Library search path will be as empty in both target and project build settings.

7)-ObjC was added in Other linker flag in target build settings.Removed -all_load from it.

8)Always search path will be YES in both target and project build settings.

9)Build archive architecture only will be YES.

最佳答案

几天前,我在尝试以这种方式添加 CorePlot 时遇到了同样的问题,但我发现有一个更简单的过程:

  1. Copy the CorePlotHeaders directory to your Xcode project

  2. Copy the Core Plot library to your Xcode project.

  3. Open your apps Target Build Settings, and for Other Linker Flags include this:

-ObjC (-all_load used to be required as a linker flag, but this is no longer needed in Xcode 4.2)

  1. Add the QuartzCore framework to the project.

  2. Change your C/C++ Compiler in the project build settings to LLVM GCC 4.2 or LLVM 1.6.

在我的例子中,我不需要更改我的 C/C++ 编译器 来使 CorePlot 工作

关于iphone - 在 xcode 4.x 中添加静态库的 header 搜索路径困惑?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14533483/

相关文章:

iphone - 如何从功能菜单中关闭@synthesize 指令

iphone - UILabel 中的文本可以有 colorWithPatternImage : assigned to it?

ios - 将照片从 iPhone 上传到 4D 服务器

xcode - XCode 的 SharedPrecompiledHeaders 文件夹路径变量

ios - 我在上传时不断收到错误 "This action could not be completed. Try again. (-22421)"

iphone - ALAssets 获取视频数据

iphone - AssetsLibrary:位置服务提示。 Instagram 是如何避免的?

ios - 旋转后 MKAnnotationView 标注未正确放置

ios - 如果在 UIWebview iOS 中加载,则重定向特定 URL

xcode - Xcode代码使用什么字体