Xcode4 工作区共享项目 [英] Xcode4 workspace sharing projects
问题描述
我正在尝试使用新的 Xcode4 工作区功能来迁移一些在它们之间存在依赖关系的 Xcode3 项目.我有一个创建静态库的项目,然后是一个依赖于静态库的应用程序项目.因此,正如指南中提到的,我创建了一个新工作区并将两个项目都拖到了工作区中.但是,当我构建我的应用程序时,它无法从我的静态库中找到头文件.我收到没有这样的文件或目录"错误.我的目的是让 Xcode 自动检测依赖项.但是,不确定我做错了什么,我无法让它工作.任何帮助是极大的赞赏.那里也没有太多文档.
I am trying to use the new Xcode4 workspace feature to migrate some Xcode3 projects that has dependencies between them. I have a project which creates a static library and then an application project which depends on the static library. So, as the guide mentioned, I created a new workspace and dragged both the projects into the workspace. However, when I build my application, it's unable to find the header files from my static library. I get "No such file or directory" error. My intention is to let Xcode auto detect the dependencies. But, not sure what I am doing wrong, I couldn't get it to work. Any help is greatly appreciated. There isn't much documentation out there either.
推荐答案
经过几个令人沮丧的小时后,我可能找到了解决方案(仍然不确定它是否正确).
After few frustrating hours, I may have found a solution (still not sure if it's the right way).
- 创建了一个新的工作区
- 添加了共享库项目
- 在共享库下面添加了应用项目(不在里面)
- 打开共享库的构建阶段并确保在复制标题时将其分组为公共
- 打开应用程序的构建设置,并在BUILD_PRODUCTS_DIR"\usr\local\include 中键入的标题搜索路径中
- 在目标的构建阶段,包含指向静态库(共享库)的链接
清理并构建,一切都成功构建.
Did a clean and build and everything was built successfully.
但是,我仍然不相信这是正确的方法,因为根据 Xcode4 指南,不需要更改设置,只需将项目添加到工作区即可解决所有问题.有一天,我希望找到正确的解决方案并使用它.
However, I am still not convinced this is the right way, as according to Xcode4 guide, no changes to settings is necessary, just adding projects to workspace will take care of everything. Someday, I hope to find the correct solution and use it.
谢谢贾维德
这篇关于Xcode4 工作区共享项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!