gpt4 book ai didi

ios - Xcode 4.2 : How to import . 来自子项目的 h 文件

转载 作者:技术小花猫 更新时间:2023-10-29 10:41:41 27 4
gpt4 key购买 nike

我是 Xcode 子项目的新手。在我的 iPhone 应用程序项目 MyProject 中,我试图将一些通用代码重构为名为 MyLibrary 的静态库项目。在我创建 MyLibrary 并移动代码后,MyProject 不再编译。错误是 MyProject 看不到 MyLibrary 中的 .h 文件。

错误 MyLibraryConfig.h: No such file or directory is coming in the line:

#import "MyLibraryConfig.h"
  • 如何在 MyProject 中导入 MyLibrary .h 文件?
  • 这里的最佳做法是什么?假设我有多个这样的库,将它们添加到父项目的 header 搜索路径是很乏味的。

最佳答案

在build设置中 --> Header Search Path --> 添加下面的条目

$(SRCROOT) 并将其标记为递归。

enter image description here

关于ios - Xcode 4.2 : How to import . 来自子项目的 h 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9501799/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com