Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
322 views
in Technique[技术] by (71.8m points)

objective c - .h file not found

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.

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.

I quit xcode then cleaned the project and that did nothing.

Any ideas, this is driving me crazy!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

When that is complete hold down the option key and again in the menu bar go to...

Product --> Clean Build Folder

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...