nameless
nameless

Reputation: 809

confusion in Header search path for adding static library in xcode 4.x?

I am getting confused in adding core plot static library in xcode 4.5. it is different from xcode 3.x versions. I tried many things, it gave header file not found and linker errors.

I have followed the steps as follows. In which situation we have to use recursive in Header search path. If any has done wrongly, please help?

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.

Upvotes: 4

Views: 1526

Answers (1)

Yaman
Yaman

Reputation: 3991

I had same issues a couple a days ago when trying to add CorePlot this way but I found out that there is a far easier process :

  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.

In my case, i did not need to change my C/C++ Compiler to make CorePlot working

Upvotes: 3

Related Questions