title: How to organize unit testing of a library project in Xcode?
body: <p>I'm not yet a fan of integrated development environments, but I'm trying to overcome my prejudices and learn Xcode.  (Eclipse/CDT is next; I couldn't get that to work for me either when I tried last year, but that's a separate issue.)</p>
  
  <p>I am writing some new code in a new project that will become (part of) a small library.  I want to unit test it, too.  How do I explain to Xcode that I'm building a (shared) library, but I also want to use it in a test program, compiled from separate source that won't be in the shared library?</p>
  
  <p>Source code:</p>
  
  <ul>
  <li>atom.c</li>
  <li>atom.h</li>
  <li>test-atom.c</li>
  </ul>
  
  <p>Produced files:</p>
  
  <ul>
  <li>libatom.dylib</li>
  <li>test-atom</li>
  </ul>
  
  <p>I've got <code>atom.c</code> and <code>atom.h</code> compiled into the library.  I'm just not sure how to organize things so that I can also build <code>test-atom</code> to link with the library.
  I'm assuming that when I've got that sorted, adding the library for the test support code that test-atom.c would be relatively straight-forward - even though it isn't under Xcode control yet.</p>
  
  <p>FWIW, I primarily work in C rather than Objective C.</p>