Confusion over header search path to add static library in xcode 4.x?

I am confused about adding a static main chart library in xcode 4.5. it differs from xcode 3.x versions. I tried many things, this gave the header file not found and linker errors.

I have completed the following steps. In this situation, we must use the recursive header search path. If someone made a mistake, please help?

1) Adding the coreplot library and its headers to the Xcode project. (checked for copy locally)

2) the converted compiler in LLVM GCC 4.2 in the project build settings (not in the target build setup)

3) The thumb compiler will be "NO"

4) Added a header search path in the project build settings, since using the recursive "$ (SRCROOT) / Libs / CorePlot / CorePlotHeaders"

5) Added header search path in the target assembly settings as $ (Inherited)

6) The library search path will be empty in both the target and the project build settings.

7) -ObjC was added to another linker flag in the target assembly settings.Removed -all_load from it.

8) Always the search path will be YES both in the target and in the assembly of the configuration project.

9) The archive archive architecture will be YES .

+4
source share
1 answer

I had the same problems a couple of days ago when I tried to add CorePlot this way, but I found out that the process is much simpler:

  • Copy the CorePlotHeaders directory to the Xcode project

  • Copy the Core Plot library into your Xcode project.

  • Open your applications Target Build Settings and other Linker flags include the following:

-ObjC (-all_load is usually required as a linker flag, but this is no longer required in Xcode 4.2)

  • Add QuartzCore frames to the project.

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

In my case, I did not need to change my C/C++ Compiler to make CorePlot work

+3
source

All Articles