Note that there are some explanatory texts on larger screens.

plurals
  1. POStatic libraries in Xcode 4
    text
    copied!<p>(My question has been asked here before but with no working answers that I can see. E.g. <a href="https://stackoverflow.com/questions/5366182/xcode4-workspace-with-static-library-project-application-project">Xcode4 Workspace with Static library project &amp; application project</a>)</p> <p>I'm trying to use a library provided by a 3rd party. They provide the XCode project which builds a <em>libLibraryName.a</em> file. They recommend adding the project as a subproject to my own, then adding the product <em>libLibraryName.a</em> file to the set of libraries described in my project settings "Link Binary with Libraries". </p> <p>The library does build correctly: the .a file is generated. But the project shows a red <em>libLibraryName.a</em> file under the Products group. I can't get it to turn black. And the parent project says it cant find <em>LibraryName</em> for linking.</p> <p>As a test I created a new static library project using the XCode 4 static-library template. This project exhibits the same behavior - the product never shows up 'black' even though the .a file is built. (<strong>Edit:</strong> it does turn black if you build for device, not simulator).</p> <p>I know that XCode 4 places intermediate and product files in a shared location by default. I've tried this setting, and I've changed the setting to place the product files in the folders described in the build settings. Neither setting works.</p> <p>Folks have also suggested building for a device rather than simulator. I've tried this to no avail.</p> <p>What gives? How do I get a static library project to recognize where it built the product, and subsequently reference this product in another project?</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