tags:

views:

137

answers:

3

I can't seem to make Xcode find the Core Plot header. I've done the following:

  1. Clone the hg repo;
  2. Drag the CorePlot-CocoaTouch.xcodeproj file into my project;
  3. Opened the CP project and compiled it successfully;
  4. Dragged the lib file into the target's static link list;
  5. Added CorePlot-CocoaTouch as a direct dependency for the target.

But I'm still getting the "CorePlot-CocoaTouch.h: No such file or directory" error on compile. I've been googling around trying to find an answer, but only seem to find a few people having the same problem but no clear solution. What have I missed?

A: 

The answers I needed are shown on this blog post, although I found I could use a relative location for the header search path rather than an absolute one. Also don't forget to add -ObjC to the linker flags, as well as -all_load until the bug has been fixed (see this comment).

Sophistifunk
+1  A: 

I found what I was looking for about the same time, even though I'm coding for Mac. The solution assumes the core-plot directory is where your Xcode project is. In my app's target settings, I set this for framework (not header) search path:

"${PROJECT_DIR}/core-plot/build/${BUILD_STYLE}/${EFFECTIVE_PLATFORM_NAME}"

Quotation marks important. And that was all I needed to do!

spamguy
Yes, I learned the hard way about the quotation marks! Although any readers need to make sure *not* to add the framework when building for iOS, it wrecks up the joint ;-)
Sophistifunk
A: 

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

dosn't work? what i have to do? please any one can help??????? thanx

anwer