.h文件未找到 [英] .h file not found
问题描述
我正在使用xcode 4开发一个应用程序,并且一切进展顺利,然后奇怪的事情开始发生.每次我创建一个新类(任何类型的类,ViewController,NSObject等)并将其导入另一个.m文件时,都会收到未找到错误"className.h"的文件.
I'm working on an app in xcode 4 and everything was going great, then something odd just started happening. Every time I make a new class (any type of class, ViewController, NSObject, etc.) and import it in another .m file I get the error "className.h" file not found.
文件在项目中,当我键入#import语句时,xcode中的代码含义甚至提供了类的名称.
The files are in the project and the code sense in xcode even supplies the name of the class when I am typing the #import statement.
我退出了xcode,然后清理了该项目,但没有执行任何操作.
I quit xcode then cleaned the project and that did nothing.
任何想法,这都让我发疯!
Any ideas, this is driving me crazy!
推荐答案
我只是遇到了同样的问题,并尝试了上述解决方案.对我有用的是清除项目.
I just had the same problem and tried the above solutions. What worked for me was a clean of the project.
在菜单栏中转到...
In the menu bar go to...
产品->清洁
Product --> Clean
完成后,请按住Option键,然后再次在菜单栏中转到...
When that is complete hold down the option key and again in the menu bar go to...
产品->清理构建文件夹
Product --> Clean Build Folder
我不确定是否需要清理构建文件夹.两者都变成我的习惯.我必须比在Xcode中做更多的事情.
I'm not sure if the clean of the build folder was necessary. It's just become habit for me to do both. I have to do this more than I would like in Xcode.
这篇关于.h文件未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!