Reputation: 976
I'm so new to xcode, I have a speechkit framework with following files as shown in image below
Now When I add this framework to my xcode project the header files are shown empty as below
and I end up with build error 'Lexical preprocessor issue SpeechKit/SpeechKit.h' file not found'. What is the issue with it? How to solve this?
Upvotes: 7
Views: 6581
Reputation: 1072
What i found that if you unzip any downloaded sample code and you get any lexical/preprocessor issue then just simply add that framework again by follow these steps Go to your target's settings and select the 4th tab (Build Phase). Open the "Compile Sources" phase and click on the '+' symbol and add your framework by clicking on (add other from sample code folder) option.
Upvotes: 0
Reputation: 5081
Your framework wasn't compiled successfully. You need to add the framework to the "Compile Sources" build phase.
Go to your target's settings and select the 4th tab (Build Phase). Open the "Compile Sources" phase and click on the '+' symbol and add your framework. The lexical/preprocessor issue "'SpeechKit/SpeechKit.h' file not found" should now be solved.
Upvotes: 2
Reputation: 41
Another newbie in Xcode here. I also spent a lot of time with this problem. My scenario is the framework was emailed to me by colleague as a zip file.
I unzipped it on windows and copied it to my Mac. Wrong move. I should have unzipped it on the Mac itself. If you are wondering why your "header" is not a folder, then this is your answer.
Upvotes: 4
Reputation: 1773
I had the same issue. Your Header symbolic link is corrupted (others too), you must replace it by a valid Symlink.
You can use ln -s command on each Symlink of your framework or use my script available here : https://gist.github.com/spawnrider/6088294#file-fix_symlinks_fmk_ios-sh
Upvotes: 8
Reputation: 1339
The right answer is, that you have to make sure that the files are compiled right. In my case i had to download the SDK/Framework of my choice again.
That should make it. I don´t know why it was not compiled proper. But as i followed the steps above, the Framework was compiled right and the Project was built.
Upvotes: 2