title: Cross Platform C?
body: <p>I am running Linux Ubuntu 10.04 and I have a Windows 7 machine and a MacBook running Mac OS X 10.6.4. How can I write a simple C program (as in <b><i>NOT QT!</b></i>) like:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char **argv)
  {
      printf("Hello Linux and Mac and Windows!")
      return 0;
  }
  </code></pre>
  
  <p>to run on all my machines without having to compile this program on Ubuntu, then Windows 7, then Mac OS X? Could I just create this in Ubuntu and cross compile it to run on several different operating systems?<br>
  <strong>UPDATE</strong><br>
  I do not mean to produce ONE binary to run on all. I mean to produce THREE binaries from the same C code in the same OS.</p>