找不到RestKit / RestKit.h文件错误 - 版本0.10.0 [英] RestKit/RestKit.h file not found error - version 0.10.0

查看:171
本文介绍了找不到RestKit / RestKit.h文件错误 - 版本0.10.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图让RestKit建立和工作时失去了我的头发。我得到可怕的词汇或预处理器问题:RestKit / RestKit.h文件未找到消息。我使用Xcode 4.2&我的项目是为iOS。

I am losing my hair in my attempts to get RestKit to build and work. I get the dreaded "Lexical or Preprocessor issue: RestKit/RestKit.h file not found" message. I use Xcode 4.2 & my project is for iOS.

早期,我有调试模式与RestKit 0.9.0完美的工作。然后我遇到了问题,而试图归档。在阅读这个论坛并尝试一些解决方案后,我决定升级到0.10.0,希望它能解决问题。

Earlier, I had debug mode working perfectly with RestKit 0.9.0. Then I ran into issues while trying to archive. After reading this forum and attempting some solutions, I decided to upgrade to 0.10.0 with hopes that it will solve the issue.

现在,我的项目甚至没有建立调试模式,我得到相同的RestKit / RestKit.h文件未找到错误。

Now, my project is not even building in debug mode and I get the same RestKit/RestKit.h file not found error.

我有这个头标搜索路径:$(BUILT_PRODUCTS_DIR)/../。 ./Headers。你可以建议(对于0.10.0版本):
1)RestKit的物理位置应该在哪里? (可能没关系,但是哪一个为你工作 - 希望我可以镜像你的设置)
2)我试图将我的标题搜索路径指向/ Developer / Library / RestKit-RestKit-69adee9 /后来到/ Developer / Library / RestKit-RestKit-69adee9 / Build

I have this under Header search path: "$(BUILT_PRODUCTS_DIR)/../../Headers". Can you please suggest (for 0.10.0 version): 1) Where should the physical location of RestKit be? (It may not matter, but which one worked for you - with hopes that I can mirror your setting) 2) I tried to point my header search path to "/Developer/Library/RestKit-RestKit-69adee9/" and later to "/Developer/Library/RestKit-RestKit-69adee9/Build"

过于混乱和沮丧..

EDIT1:几个小时后,我放弃了。 Nuked我的项目。创建了一个新项目。重新创建文件(从上一个项目复制粘贴)。现在RestKit未找到错误消失了!但现在,我得到这个其他错误:

After several hours, I gave up. Nuked my project. Created a fresh project. Re-created the files (copy paste from prev project). Now "RestKit not found" error is gone! But now, I am getting this other error:

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RKObjectMapping", referenced from:
objc-class-ref in myclassname1.o
"_OBJC_CLASS_$_RKObjectManager", referenced from:
objc-class-ref in myclassname2.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我查了&确保我没有添加RestKit.framework ...我不知道为什么clang错误现在发生

I checked & made sure that I did NOT add RestKit.framework... I've no idea why the clang error is happening now

EDIT2: libRestKit.a是红色的。根据 https://github.com/RestKit/RestKit/wiki/安装 - 疑难解答即可。只是为了它的,我删除所有链接的依赖。删除了其他链接器标志。关闭&重新打开Xcode。把它们全部回来。那个错误消失了。也许我错过了一个框架,导致clang错误。但这是不太可能的,我检查&双检。它现在工作。

The libRestKit.a was red. It is OK according to https://github.com/RestKit/RestKit/wiki/Installation-Troubleshooting Just for the heck of it, I removed all the linked dependencies. Removed the "Other linker flags". Closed & reopened Xcode. Put them all back. That error is gone. Maybe I missed a framework which resulted in clang error. But it is highly unlikely for I checked & double checked. It works now.

它构建&存档在调试模式。

It builds & archives on debug mode. I haven't tried the distribution mode yet.

EDIT3: Apple第一次批准了我的应用程序,它是活的!我仍然不知道是什么导致的问题在这里。 Nuking一个现有的项目&创建一个新的&复制旧文件(并定期检查构建是否通过)不能是解决方案。

Apple approved my app in the first go & it is live! I still do not know what caused the issue here. Nuking an existing project & creating a new one & copying over the old files (& periodically checking if build goes through) cannot be a solution. So I am leaving this question open.

推荐答案

我想我可以说明一下。

升级到0.10.0时,您将标题搜索路径更改为$(BUILT_PRODUCTS_DIR)/../../ Headers , 对?

When you upgrade to 0.10.0, you change your header search paths to "$(BUILT_PRODUCTS_DIR)/../../Headers", right?

安装指南只说明为项目设置执行此操作。不过,在许多情况下包含我们,您还需要同时更新目标设置

The install guide only says to do this for the project settings. However in many cases, mine included, you'll need to also update them for the target settings as well.

目标设置仍然具有旧的标题搜索路径,并且由于某种原因决定不继承项目设置。

The target settings will still have the old header search paths, and for whatever reason decide not to inherit from the project settings.

这篇关于找不到RestKit / RestKit.h文件错误 - 版本0.10.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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