title: "Undefined reference" when linking C code in Linux
body: <p>I have a code library (written entirely in C) that I typically compile under Windows, into a <code>.DLL</code>.</p>
  
  <p>I want to compile it under Linux so I can distribute it. I don't care if I distribute it as a <code>.a</code>, a <code>.so</code>, or a bunch of <code>.o</code> files.</p>
  
  <p>All of the individual <code>.c</code> files compile successfully. But when I try to compile a test executable that includes all the <code>.o</code> files, I get a bunch of undefined reference errors.</p>
  
  <p>All of the <code>.o</code> files are on the command line as full paths, and I don't get any errors about missing files.</p>
  
  <p><code>cc testctd.c -o testctd.out -lm -lc $LIBRARY-PATH/*.o</code></p>
  
  <p>I also have undefined references to <code>_open</code>, <code>_write</code>, etc.</p>