IOS - File in xcode project not found

I am getting an error:

Error: Lexical or Preprocessor Issue: 'Constants.h' file not found

When the code is run, the issue disappears and the app works fine.

How can I fix this?

This question and answers originated from
Question by Lithu T.V (12/6/2011 7:29:17 AM)


two things:

  1. Do a product "clean" (CMD-SHIFT-K)
  2. Avoid over-including headers from headers.

This involves using forward declarations whenever possible in headers (only #include another header if you are extending the class or implementing a protocol in that header). Use forward declarations for classes and protocols in your headers; then do the actual #import in your .m files.

@class SomeTypeINeedWhichIsAClass;
@protocol SomeProtocolWhichIsUsedInMyMethodSignatures;
Answer by ctrahey

Find More Answers
Related Topics  ios
Related Questions
  • <libxml2/tree.h> not found in my Xcode project

    Hi in my Xcode project I included libxml2.dylib framework. still i am getting a error called libxml2/tree.h not found.How to resolve this issue?. I didn't give any search header paths. I am using Xc…
  • 'vector' file not found in one xcode project, but not in other

    I am trying to use vectors in xcode, but it's not working in my current project. I get the error message 'vector' file not found. I have already added #include < vector > and changed the fil…
  • Include issue: header file not found in iOS project in Xcode 4

    Consider my setup looks like this: XCode 4 iphone/ipad project ObjC .m file that includes a new header file, this header is reported as "file not found" ObjC .m file is located in root fold…
  • 'libxml/tree.h' file not found when archiving the project in xCode

    I am using the libxml. library in my project, in order to use TouchXML. When I am running this project in simulator and on an iOS device my application runs without any warnings nor err…
  • Xcode: Library file not found in existing project, where is it expected?

    I am currently working into an existing project that uses the SS Toolkit. The previous developer told me he had one folder in his home library folder called sstoolkit where he had the SS Toolkit fi…
  • File not found error in xcode

    I have imported the folder containing SUPQueueConnection.h to the project and to the project root too.Still it is showing the same error SUPQueueConnection.h file not found. And we imported all s…
  • XCode "File Not Found" error

    I am new to Xcode and i am working on a SoundBoard app. In my viewcontroller.m file, I typed in #import " (less than)AVFoundation/AVAudioPlayer.h", only to get the error "File not Found". I did add …
  • iostream not found in Xcode

    I have problem including ZXing in my App. I get error: "iostream file not found". I have done everything like in ZXing instruction but i can't get this working. I'm including this in .mm file. I use…
  • 'iostream' file not found error occur in xcode 4.5?

    i m practising C++. i just add c++ files in XCode and write some string splitting functionality in it. After that i include that C++ file i.e. extension of .mm file in my AppDelegate file and call f…
  • xcode4 file not found when is already in project

    I'm using touch json, I imported and copied the files inside my folder, then #import "CJSONDeserializer.h" wich is recognized by the autocompleter, but when building, it appears that CJSONDeseria…