IPhone SDK File Will Not be Included
I have am trying to include a JSON parsing library into my app and I d开发者_开发技巧ownloaded 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?
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.
精彩评论