title: Qt's moc causing "undefined reference to:" error
body: <p>I am working on a simple drawing widget in Qt (all of the following is within one class).  In the header file, I have defined</p>
  
  <pre><code>private:
  QPointF translateToCanvas (QPointF input);
  </code></pre>
  
  <p>and in the CPP file I have defined</p>
  
  <pre><code>QPointF translateToCanvas (QPointF input) {
      return input - QPointF(CANVAS_MARGIN_X, CANVAS_MARGIN_Y);
  }
  </code></pre>
  
  <p>Somewhere else in the code, I call this with</p>
  
  <pre><code>QPointF newPoint = translateToCanvas(anotherPoint);
  </code></pre>
  
  <p>Whenever I compile, it gives me the error "undefined reference to `MyClass::translateToCanvas(QPointF)'", and this is happening inside the stuff that moc's generating and not actually my literal code.</p>
  
  <p>What could be causing this error in Qt?  (I'm using Qt Creator with Qt 4.5.)</p>