Doug Molineux
Doug Molineux

Reputation: 12431

IPhone SDK File Will Not be Included

I have am trying to include a JSON parsing library into my app and I downloaded a JSON library from github, so I dragged the JSON directory into my Classes Folder in XCode and I can open up JSON.h fine and see all of its contents. But when I import it into my implementation file with this code:

#import "JSON/JSON.h"

I get a compile error saying JSON/JSON.h: No such file or directory

But I can see the file in my file browser in xcode!

This is the first time I've included another file like this :) Any advice would help!

Do I need to perhaps include it in my header file also?

Upvotes: 1

Views: 511

Answers (1)

Jeremy W. Sherman
Jeremy W. Sherman

Reputation: 36143

Try doing just:

#import "JSON.h"

I believe Xcode just throws all the directories in your project into the header search path. You can check by looking at the actual commands being executed by Xcode during compilation.

Upvotes: 2

Related Questions