简体   繁体   中英

How can I configure my header search paths for OpenEars

I am trying to include the OpenEars Framework in my project. But it does not seem to see the path to my headers unless I write the absolute path.

Absolute path works

#import </Absolute_PATH_To_Framework/OpenEars.framework/Headers/OELanguageModelGenerator.h>
#import <Absolute_PATH_To_Framework/Headers/OEAcousticModel.h>

The path from the framework does not work though #import #import

OpenEars developer here. If you have an issue with including OpenEars' headers there is probably some other issue in the app, since configuring header search paths and/or giving unusual import statements aren't needed for using the framework. I recommend either following the tutorial here: http://www.politepix.com/openears/tutorial or examining the sample app that ships with OpenEars to compare against known-working examples of the framework being successfully added to a project. If you want to troubleshoot it with me further, go ahead and bring your question over to the OpenEars forums since Stack Overflow isn't oriented towards in-depth troubleshooting processes.

I know this is quite late to answer, I was facing this exact issue and wasted an entire day trying to figure out what was wrong.

Turns out we need to add the path for the framework under "Framework Search Paths" at Xcode Build Settings .

The tutorial at OpenEars specifically mentions this point - OpenEars Tutorials

  1. Navigate to project Build Settings and find the setting "Framework Search Paths"
  2. The "Framework Search Path" for OpenEars is the path minus the last path element, so if it says as

     "/Users/you/Documents/YourApp/Resources/Framework/OpenEars.framework" 

    then it should be

     "/Users/yourname/Documents/YourApp/Resources/Framework/" 
  3. Keep the "Recursive" checkbox unchecked

  4. Make sure to also set the Bridge header path under " Objective-C Bridging header " at Build Settings

  5. Set the headers in the Bridge header file, and run the app it should work fine

     #ifndef Bridging_Header_h #define Bridging_Header_h #import <OpenEars/OELanguageModelGenerator.h> #endif 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM