title: What is the VTT for a class?
body: <p>Recently ran across a C++ linker error that was new to me.</p>
  
  <pre><code>libfoo.so: undefined reference to `VTT for Foo'
  libfoo.so: undefined reference to `vtable for Foo'
  </code></pre>
  
  <p>I recognized the error and fixed my problem, but I still have a nagging question: what exactly is a VTT?</p>
  
  <p><em>Aside:</em> For those interested, the problem occurs when you forget to define the first virtual function declared in a class.  The vtable goes into the compilation unit of the class's first virtual function.  If you forget to define that function, you get a linker error that it can't find the vtable rather than the much more developer-friendly can't find the function.</p>