找不到 Xcode 5 头文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21669840/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:38:18  来源:igfitidea点击:

Xcode 5 Header file not found?

iosobjective-cxcodebuildxcode5

提问by Kev84

I'm new to iOS development, and downloaded a sample project to play with.

我是 iOS 开发的新手,下载了一个示例项目来玩。

The project itself required a the GMGridView library which was NOT included with the download.

项目本身需要一个未包含在下载中的 GMGridView 库。

So i downloaded the library separately, added the reference ".xcodeproj" to it and crossed my finger and prayed that it'll work.

所以我单独下载了这个库,向它添加了引用“.xcodeproj”,并祈祷它会起作用。

Obviously it didn't, that's why i'm here.

显然没有,这就是我在这里的原因。

The error i keep getting is this GMGridView/GMGridView.hfile not found.

我不断收到的错误是GMGridView/GMGridView.h找不到此文件。

The file header IS there,

文件头在那里,

Things that I tried before screaming for help:

我在寻求帮助之前尝试过的事情:

  • added "GMGridView.xcodeproj" in "BuildPhase" -> "Target Dependencies" of Z-way project.
  • ensured the Search Path has GMGridView, i set it to recursive, as well as tried both relative and absolute path. no luck.
  • 在 Z-way 项目的“BuildPhase”->“Target Dependencies”中添加了“GMGridView.xcodeproj”。
  • 确保搜索路径具有GMGridView,我将其设置为递归,并尝试了相对和绝对路径。没运气。

What else could be the reason, I'm totally stumped?

还有什么可能是原因,我完全被难住了?

File Structure

文件结构

回答by Lei Zhang

Another possible cause:

另一个可能的原因:

Make sure you don't have a duplicated header (that is hidden somewhere in the folder) that has a wrong path(missing to xcode).

确保您没有路径错误(xcode 丢失)的重复标题(隐藏在文件夹中的某处)。

回答by Chetan Prajapati

"Always Search User Path"in Build Setting- Set it to "Yes".

"Always Search User Path"Build Setting- 将其设置为“是”。

Also Try with

也试试

"Target Dependencies"in Build Phases- Add your dependent project here.

"Target Dependencies"Build Phases- 在此处添加您的依赖项目。

回答by valbu17

What about under Build Phases -> Link Binary with Libraries -> + ??? try to see if you can find it there..

在 Build Phases -> Link Binary with Libraries -> + ??? 试试看能不能在那里找到