Pankaj Kainthla
Pankaj Kainthla

Reputation: 2489

"FBConnect/FBConnect.h" no such file or directory error

I am developing an iphone application which has some facebook integration in it.I added the fbconnect folder which i downlaoded from internet and added #import "FBConnect/FBConnect.h". But when i run the app it shows a lot of errors like

  "FBConnect/FBConnect.h" no such file or directory
  "FBConnect/FBsession.h" no such file or directory etc.

I downloaded some facebook projects that works fine But what can be the problem with mine?

Upvotes: 0

Views: 3895

Answers (3)

Pankaj Kainthla
Pankaj Kainthla

Reputation: 2489

I got a solution from the above answer for this but i want to give all details about this so others can benifit .

  • First download a fbconnect project from this site
  • Then make your own facebook project and save the downloaded project folder in the same directory as your project
  • Then go to target>get info>Build>header search and make a new field as ../src(or whatever you name the downloaded project folder)
  • Drag the Fbconnect folder to your xcode and mark the copy check box (It must include the FBConnect bundle)
  • Run.

Upvotes: 1

zoul
zoul

Reputation: 104065

I’m not sure if there are other, easier ways, but I do this using the Header Search Paths setting (right-click on the target, Get Info, select the Build tab and filter for Header). There you have to enter the path to the Facebook SDK so that the compiler sees the FBConnect directory.

Upvotes: 1

Swastik
Swastik

Reputation: 2425

Your header search path is not correct.

In your header search paths write ../src/ & place your facebook connect downloaded source in the same folder in which your project is kept.It should work then.

Upvotes: 4

Related Questions