为什么找不到静态库的头文件进行存档? [英] Why is a static library's header file not found for archiving?

查看:228
本文介绍了为什么找不到静态库的头文件进行存档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以构建调试就好了。我已经三次检查过静态库是否包含在项目的构建阶段设置中。我也尝试过其他类似标题包含路径的东西,但无济于事。

I can build for debugging just fine. I've triple checked that the static library is included in the build phases settings for the project. I've also tried other things like header include paths and such to no avail.

当我尝试为测试航班建立IPA时,我收到一个错误:
#import< MBProgressHUD / MBProgressHUD.h>

When I try to build an IPA for test flight, I get an error: #import <MBProgressHUD/MBProgressHUD.h>

我之前能够建立一个IPA ,但它之前没有实现/使用MBProgressHUD静态库。

I've been able to build an IPA before, but it didn't implement/use the MBProgressHUD static library before.

我可以手动包含头文件和代码文件而不是静态链接它,但我更喜欢知道这里发生了什么。

I can include the the header and code file manually instead of statically linking it, but I prefer to know what's going on here.

谢谢。

PS - 我使用了静态库指令给出< a href =https://github.com/jdg/MBProgressHUD> https://github.com/jdg/MBProgressHUD

PS - I used the "Static Library" instructions given https://github.com/jdg/MBProgressHUD

推荐答案

借助其他SO问题( https://stackoverflow.com/a/10159481/143225)我能够获得要包含的头文件。

With the help of another SO questions(https://stackoverflow.com/a/10159481/143225) I was able to get the header file to include.

显然,存档构建过程在某种程度上是不同的而不是调试构建过程。通过将$(BUILD_ROOT)/../ IntermediateBuildFilesPath / UninstalledProducts添加到它成功构建的用户标题搜索路径构建设置中。

Apparently, the archive build process is somehow different than the debug build process. By adding "$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts" to the "User Header Search Paths" build setting it built successfully.

我仍然想知道为什么这不符合我的预期。我有一个预感,该项目是为了自动包含调试和发布版本的头文件而构建的,但不知何故不适用于存档构建。这很奇怪,因为我认为归档版本继承自Xcode方案设置的调试或发布设置。

I'd still like to understand why this isn't working as I expect it. I have a hunch that the project is built to auto include the header files for debug and release builds, but somehow not for archive builds. This is odd because I thought archive builds inherit from either debug or release settings from Xcode's scheme settings.

欢迎任何其他信息。

这篇关于为什么找不到静态库的头文件进行存档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆