title: g++ produces empty object file
body: <p>I am attempting to compile a basic array wrapper template class into a .o file, to try and figure out how to make dynamic libraries. However, when compiling the source with</p>
  
  <pre><code>g++ -std=c++0x -c array.cpp
  </code></pre>
  
  <p>the resulting file is only ~650 bytes. I examined the file with nm, and found the only symbols it contained were</p>
  
  <pre><code>00000001 r _ZStL13allocator_arg
  00000000 r _ZStL19piecewise_construct
  </code></pre>
  
  <p>which seem to be features of the C++11 compilation, as when compiled without the -std=c++0x flag they are gone.</p>
  
  <p>Attempting to compile the program test code and all with the command</p>
  
  <pre><code>g++ -std=c++0x -o tester tester.cpp array.cpp
  </code></pre>
  
  <p>produces linker errors for everything in array.cpp but otherwise compiles cleanly.</p>
  
  <p>I honestly have no idea what is going on with this. I can post the contents of array.cpp and array.hpp if you suspect this an issue with my code itself, rather than how I am compiling it.</p>