title: How to combine a view based iPhone project with a C based command line tool project?
body: <p>I have a view based iPhone project which performs some animations &amp; suchlike, Seperately I have a C based command line tool project which I use to do some calculations. </p>
  
  <p>I want to integrate the two, so that I can call my C based calculations function at a certain point in my original iPhone project.</p>
  
  <p>The command line tool project is in the form of 2 files, calculations.pch &amp; calculations.m.</p>
  
  <p>I tried to add a new file to my original class &amp; simply copy in the 2 new files (&amp; importing calculations.pch in the View Controller) but upon building I get the error: </p>
  
  <p>Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1</p>
  
  <p>Any suggestions? thanks in advance!</p>
  
  <p>The .pch is quite sparse &amp; looks like this:</p>
  
  <pre><code>//
  // Prefix header for all source files of the 'Tester' target in the 'Tester' project.
  //
  
  #ifdef __OBJC__
  #import &lt;Foundation/Foundation.h&gt;
  #endif
  </code></pre>