xcode 在 xcodebuild 期间未找到 RestKit/RestKit.h' 文件错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13416900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
RestKit/RestKit.h' file not found error during xcodebuild
提问by Jesly Varghese
I am trying to use Jenkins-CI to auto-build an iOS project that uses Restkit, apparently, restkit resides as a project inside the main project. And the project builds successfully using the XCode-IDE.
我正在尝试使用 Jenkins-CI 自动构建一个使用 Restkit 的 iOS 项目,显然,restkit 作为一个项目驻留在主项目中。并且该项目使用 XCode-IDE 成功构建。
But when i use xcodebuild(jenkins uses it, and i did simulate the same) to build the project it gives the
但是当我使用 xcodebuild(jenkins 使用它,我确实模拟了相同的)来构建项目时,它给出了
error RestKit/RestKit.h file not found
Any clue whats going wrong, can this be corrected by using scheme file? If so how? or can I simulate, how XCode-IDE deals with this?
任何线索出了什么问题,可以通过使用方案文件来纠正吗?如果是这样怎么办?或者我可以模拟,XCode-IDE 如何处理这个?
采纳答案by Jesly Varghese
I don't think am answering this question, but a proper workaround this would be making use of XCode Schemes. Also one should mark the particular scheme as Shared.
我不认为我在回答这个问题,但适当的解决方法是使用 XCode Schemes。还应将特定方案标记为共享。
These links can serve helpful
这些链接可以提供帮助
http://tetontech.wordpress.com/2011/05/26/command-line-building-using-xcode/
http://tetontech.wordpress.com/2011/05/26/command-line-building-using-xcode/
http://developer.apple.com/library/ios/#recipes/xcode_help-scheme_editor/Articles/SchemeManage.html
http://developer.apple.com/library/ios/#recipes/xcode_help-scheme_editor/Articles/SchemeManage.html
回答by kraag22
I have exactly same problem. My solution:
我有完全相同的问题。我的解决方案:
firstly you have build RestKit. After than, you can build your project.
首先,您已经构建了 RestKit。之后,您可以构建您的项目。
If you run script from you project's top directory and restkit is in RestKit folder:
如果您从项目的顶级目录运行脚本并且 restkit 在 RestKit 文件夹中:
xcodebuild -project RestKit/RestKit.xcodeproj -target RestKit -sdk iphonesimulator -configuration Debug clean build
Then you can build you project.
然后你可以构建你的项目。
If this isn't enought, add to "Header search paths" this two :
如果这还不够,请将这两个添加到“标题搜索路径”中:
"$(BUILT_PRODUCTS_DIR)/../../RestKit/Build/Headers"
"$(BUILT_PRODUCTS_DIR)/../../Headers/RestKit"
And beware, you have to add this to all targets
请注意,您必须将此添加到所有目标
回答by SFeng
I guess your problem is the same as "Xcodebuild'ing a workspace and setting a custom build path". Set the SYSROOT with absolute path, default is relative path.
我猜你的问题与“ Xcodebuild'ing a workspace and setting a custom build path”一样。将 SYSROOT 设置为绝对路径,默认为相对路径。