title: g++ undefined reference to typeinfo
body: <p>I just ran across the following error (and found the solution online, but it's not present in Stack Overflow):</p>
  
  <blockquote>
    <p>(.gnu.linkonce.[stuff]): undefined
    reference to [method] [object
    file]:(.gnu.linkonce.[stuff]):
    undefined reference to `typeinfo for
    [classname]'</p>
  </blockquote>
  
  <p>Why might one get one of these "undefined reference to typeinfo" linker errors?</p>
  
  <p>(Bonus points if you can explain what's going on behind the scenes.)</p>