Note that there are some explanatory texts on larger screens.

plurals
  1. POCompile, Build or Archive problems with Xcode 4 (and dependencies)
    text
    copied!<p>This question has evolved over the past several weeks to cover more general issues with <a href="/questions/tagged/xcode4" class="post-tag" title="show questions tagged 'xcode4'" rel="tag">xcode4</a> (and upgrading projects form older <a href="/questions/tagged/xcode" class="post-tag" title="show questions tagged 'xcode'" rel="tag">xcode</a>s).</p> <p>However many of the issues can be solved by following the same set of instructions.</p> <p>If you have any of the following issues, try the methods in the accepted answer:</p> <ul> <li>Xcode 4 fails to archive an App</li> <li>Xcode 4 creates an unusable archive</li> <li>Xcode 4 does not create an .ipa</li> <li>Xcode 4 fails to compile due to preprocessor errors</li> <li>Xcode 4 cannot find headers</li> <li>Xcode 4's code complete is not working</li> <li>Project dependancies won't compile</li> <li>Adding a dependancy causes any of the above issues</li> </ul> <h2>Original Question</h2> <p>Title: <em>"lexical or preprocessor issue file not found" in Xcode 4</em></p> <p>I have a project in Xcode 4 that will build fine and run on the device and simulator but when trying to Archive it errors when looking for headers files associated with a static library:</p> <pre><code>In file included from /Volumes/Development/Path/LBProject/LBProject/LBProject-Prefix.pch:15: In file included from /Volumes/Development/Path/LBProject/LBFDefines.h:23: In file included from /Volumes/Development/Path/LBProject/Classes/LBProjectAppDelegate.h:11: In file included from /Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDirectoryManager.h:10: /Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDataModel.h:11:9: fatal error: 'Merchant.h' file not found [1] #import "Merchant.h" ^ 1 error generated. </code></pre> <p>Xcode gives the error</p> <pre><code>lexical or preprocessor issue file not found </code></pre> <p><em>Much</em> Googling has show many people are having this issue but no solution. Anyone got a fix or even a clue. </p> <p><strong>Update:</strong> The <code>user header</code> search paths are set to <code>${BUILT_PRODUCTS_DIR}</code> in all configurations. It builds fine using any configuration except when archiving. </p> <p><strong>Update 2:</strong> <code>Merchant.h</code> is a Core Data class that is auto-generated and therefore inside <code>.xcdatamodeld</code> package, however the headers are all copied to the public headers directory when the library is built.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload