Project can find the OpenEars framework headers, but not Slt :-(

Home Forums OpenEars Project can find the OpenEars framework headers, but not Slt :-(

Viewing 12 posts - 1 through 12 (of 12 total)

  • Author
    Posts
  • #14190
    flint
    Participant

    Hello everyone,

    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].

    Other information:
    * 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!

    Matthew

    #14191
    Halle Winkler
    Politepix

    Hi Matthew,

    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.

    #14269
    flint
    Participant

    Halle,

    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!

    Matthew

    #14270
    Halle Winkler
    Politepix

    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.

    #1018632
    Claude
    Participant

    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-added

    #1018633
    Halle Winkler
    Politepix

    Welcome Claude,

    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!

    #1018634
    Claude
    Participant

    Sure!

    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:

    “\\\”$(SRCROOT)/../externals/OtherCompany/OtherFramework\\\””,
    “/Users/claude/Documents/myproject/workspaces/externals/politepix/OpenEars”,

    (Note, you may have even more backslashes if you added more than one framework.) This is wrong. Change it to look like this:

    “\”$(SRCROOT)/../externals/externals/OtherCompany/OtherFramework\””,
    “\”$(SRCROOT)/../externals/politepix/OpenEars\””,

    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.

    #1018635
    Halle Winkler
    Politepix

    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.

    #1018636
    Claude
    Participant

    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.

    #1018637
    Halle Winkler
    Politepix

    Sheesh. Off to file a radar.

    #1018662
    Halle Winkler
    Politepix

    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.

    #1018663
    Claude
    Participant

    Let’s hope Apple fixes this one.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.