Note that there are some explanatory texts on larger screens.

plurals
  1. POXcode dependencies across different build directories?
    text
    copied!<p>I am trying to set up Xcode for a project which contains multiple executables and static libraries. I have created multiple targets and set up the linking and dependencies, and initially everything works great. The catch...</p> <p>This is an existing project which already has Visual Studio and Makefile builds. Those builds put the libraries in a <strong>lib/Debug</strong> directory and the executables in <strong>bin/Debug</strong>. So in Xcode I changed the Build Products Path to "lib" and "bin" respectively (so we can use one set of documentation for all of the platforms). This puts the compiled targets in the right place, but completely breaks both the linking (Library not found) and the dependencies. </p> <p>I can fix the linking by adding <strong>$(SRCROOT)/lib/Debug</strong> to the Library Search Paths for each executable (but it feels like Xcode should be able to figure this out on its own, which makes me think I'm doing something wrong).</p> <p>But — I can't figure out how to get the dependencies working again. If I change a library source file, the library will rebuild but not the dependent executables. If I force a build of the executable Xcode returns success without doing anything; it thinks the target is up to date. If I clean the target and then rebuild it works.</p> <p>So, any ideas here? Is Xcode being fundamentally stupid in this regard, or is it me (I'm leaning toward the latter)?</p> <p><strong>Update:</strong> I've posted a sample project to demonstrate the issue at <a href="http://share.industriousone.com/XcodeDepsIssue.zip" rel="nofollow noreferrer">http://share.industriousone.com/XcodeDepsIssue.zip</a>. Build it once, then modify MyStaticLib.c and build it again. The executable will not relink (and it should). Many thanks for any help on this one.</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