title: Undefined symbol _main in TC
body: <p>I have 4 <code>.c</code> files, one called <code>main.c</code> with <code>main()</code> but I get a linking error "undefined symbol _main in module c0.ASM." I am using TC.</p>
  
  <p>I've searched on this site and the web, and found things like:</p>
  
  <p><a href="https://stackoverflow.com/questions/29073978/undefined-symbol-for-architecture-x86-64-in-compiling-c-program">undefined symbol for architecture x86_64 in compiling C program</a></p>
  
  <p><a href="https://stackoverflow.com/questions/26728897/undefined-symbol-main-in-module-c0-asm">undefined symbol _main in module c0.ASM</a></p>
  
  <p>but all of them seem to be gcc or c++ errors. The files are too large to paste here so I've uploaded them to mediafire.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include "mpx.h"
  
  int main()
  {
  return 0;
  }
  </code></pre>
  
  <p>If I take out #include "MPX.H," I lose access to all shared variables defined in mpx.h, but if I get rid of all those too, program runs as it should (prints a statement and returns 1.</p>
  
  <p>mpx.h:</p>
  
  <p><a href="http://www.mediafire.com/view/2pcxhwy9rwk9lls/MPX.H" rel="nofollow noreferrer">http://www.mediafire.com/view/2pcxhwy9rwk9lls/MPX.H</a></p>
  
  <p>compiler options: treat enums as ints, floating point emulation, generate underbars, debug info in objs, fast floating point</p>
  
  <p>linker options:  defalut libraries, "no stack" warning, case sensitive link, output - standard EXE</p>