在 XCode 中包含来自自定义框架的标头
向项目添加自定义框架时,我是否应该调整 FRAMEWORK_SEARCH_PATHS
或 HEADER_SEARCH_PATHS
?
我有 MainProject.xcodeproject
链接 SomeFramework.framework
,只需从 SomeFramework.xcodeproject
中的“产品”拖动到主项目中的“链接二进制库”构建阶段。
框架在其 Headers
目录中包含所有必需的标头。但是,在我的项目中,我不能简单地使用:
#import <SomeFramework.h> // I'm pretty sure this file exists
来包含此标头。构建失败“没有这样的文件或目录”。编译器标志包括 -F…/SomeFramework/build/Release ,该目录包含带有 Headers
目录符号链接的框架。
(顺便说一句:这是针对 Mac OS X 的。我不关心 iPhone。)
Am I supposed to adjust FRAMEWORK_SEARCH_PATHS
or HEADER_SEARCH_PATHS
when I add custom frameworks to the project?
I have MainProject.xcodeproject
that links SomeFramework.framework
that's simply dragged from "Products" in SomeFramework.xcodeproject
to "Link with Binary Libraries" build phase in main project.
Framework contains all required headers in its Headers
directory. However, in my project I can't simply use:
#import <SomeFramework.h> // I'm pretty sure this file exists
to include this header. Build fails "No such file or directory". Compiler flags include -F…/SomeFramework/build/Release
and that directory contains framework with Headers
directory symlink in it.
(BTW: this is for Mac OS X. I don't care about iPhone.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将包含框架的目录路径添加到 FRAMEWORK_SEARCH_PATHS 即可。除非是拼写错误,否则您的问题似乎
应该是
Just adding the path to the directory containing the framework to FRAMEWORK_SEARCH_PATHS will work. Unless it's a typo, your problem seems to be
which should be