- December 1, 2012 at 9:55 pm #14190
I have a problem integrating with OpenEars:
* following the instructions in the tutorial, I drag the Framework folder to my project
* I try to import and
* When building, only the OpenEars headers can be found
This is the error:
Lexical or Preprocessor Issue
‘Slt/Slt.h’ file not found
I can successfully instantiate ‘FliteController’ object with [[FliteController alloc] init].
* this is an existing project
* if I start a completely new project and follow the tutorial, then it works fine
* comparing the Build Settings for the existing and new projects doesn’t show any useful differences
* Framework Search Path is “$(SRCROOT)/Framework”
* which is evalutated to /Users/matthew/Dev/projectfolder/projectname/Framework
* the Framework folder contains both ‘OpenEars.framework’ and ‘Slt.framework’
* both frameworks are including in my build target
So I can’t figure out why “OpenEars” headers are found but “Slt” headers are not :-(
Any ideas gratefully received!
MatthewDecember 1, 2012 at 10:06 pm #14191
Generally this only happens if the settings in the “Add files” dialog when doing the import are wrong with regard to these instructions:
Make absolutely sure that in the add dialog “Create groups for any added folders” is selected and NOT “Create folder references for any added folders” because the wrong setting here will prevent your app from working.
The other possibility is that the version of OpenEars in your existing app is an old version, or the path to the framework in the search path leads to an old version.
Otherwise, it’s always a good step to clean the project, and to quit and restart Xcode. Let me know if any of this helps.December 1, 2012 at 10:37 pm #14269
Thank-you for your reply. I’m pretty sure I did the import correctly, and they are using the same version.
I am making progress though – by just using this new ‘xcproject’ and importing my project’s existing classes into it. The existing project was getting quite disorganised anyway!
Thanks for taking the time to reply!
MatthewDecember 1, 2012 at 10:41 pm #14270
Yeah, I suppose that somehow or other it has to be a project settings issue if the tutorial method works but it doesn’t work in the existing project. Glad to hear you are getting better results with a new project and I hope it continues to go smoothly.October 15, 2013 at 12:39 pm #1018632
This just happened to me with fresh downloads of OpenEars. It looks like it is an Xcode 5 issue, Xcode is adding absolute paths, not relative paths when frameworks are added. See http://stackoverflow.com/questions/19109085/adding-frameworks-to-project-in-xcode-5-and-having-relative-paths-addedOctober 15, 2013 at 12:46 pm #1018633
Can you elaborate a little on how the use of an absolute path which exists causes Slt.h to not be found at its location after a different framework is added? Although I read the SO discussion I’m not quite following yet how it causes breakage in this scenario (although I fully understand why that Xcode 5 bug would be annoying over the life of a project). Thank you!October 15, 2013 at 1:01 pm #1018634
Xcode does a little too much sometimes when showing you your search paths, it is hard to sometimes see exactly what is “under the hood” so I use a basic text editor for those difficult cases. I use BBEdit BTW, great product!
In the Finder, right click on your Xcode project and select “Show Package Contents.” This will open the Xcode project file bundle. Drag project.pbxproj to your text editor.
Search for PolitePix until you find some lines that look something like this:
(Note, you may have even more backslashes if you added more than one framework.) This is wrong. Change it to look like this:
You’ll have 2 sections like this to fix and of course your local paths will likely be different than mine! You should now be able to find your old frameworks.October 15, 2013 at 1:08 pm #1018635
Aha, so the issue isn’t specifically that the paths are absolute but that they are kind of mangled by Xcode, am I understanding correctly? Thank you for following up.October 15, 2013 at 1:09 pm #1018636
Yes, the SO posting wasn’t exactly correct. Yes, the new frameworks have absolute paths but it mangles the existing frameworks paths! This is for Xcode Version 5.0 (5A1413) if that helps.October 15, 2013 at 1:13 pm #1018637
Sheesh. Off to file a radar.October 17, 2013 at 12:47 pm #1018662
Well, I’ve sent in a radar, pointed it to another radar for the bug on Open Radar, added help with this to the top of the FAQ, and changed the instructions in the tutorial tool to recommend using the Stack Overflow-recommended workaround of always selecting the “copy to project” option, but I’m not sure what else to do about this. It’s pretty much in Apple’s hands.October 17, 2013 at 12:50 pm #1018663
Let’s hope Apple fixes this one.
You must be logged in to reply to this topic.