title: Compiling program using the this-keyword
body: <p>I am trying to compile a program written by someone else, using makefiles, and I don't have time to learn everything in the program before I use it - therefore I'm mystified by some of the errors. </p>
  
  <p>The first error is</p>
  
  <pre><code>(...): In function `_ZN30RealTriDiagonalSymmetricMatrix14ResizeAndCleanEii':
  /home/jorgen/diaghamsvn/DiagHam/src/Matrix/RealTriDiagonalSymmetricMatrix.cc:350: 
  undefined reference to `GarbageFlag::Used()'
  </code></pre>
  
  <p>The offending line in <em>RealTriDiagonalSymmetricMatrix.cc</em> is:</p>
  
  <pre><code>if (this-&gt;Flag.Used() == true)
  </code></pre>
  
  <p>I look up the file <em>GarbageFlag.h</em> and it contains the function <em>Used()</em>; here's part of it:</p>
  
  <pre><code>class GarbageFlag
  {
  
   private:
  
  #ifdef __SMP__
  pthread_mutex_t *FlagMutex;
  #endif
  
  
  public:
  
  // default constructor
  GarbageFlag();
  
  // copy constructor
  // flag = garbage flag to copy
  GarbageFlag(const GarbageFlag&amp; flag);
  
  // destructor
  ~GarbageFlag();
  
  // return value = reference on current garbage flag
  GarbageFlag&amp; operator = (const GarbageFlag&amp; flag);
  
  bool Used ();
  </code></pre>
  
  <p>Also, the file <em>RealTriDiagonalSymmetricMatrix.cc</em> includes a header, which again includes <em>GarbageFlag.h</em>. So I'm confused as to why it can't find the function.</p>
  
  <p>There are a lot of similar errors after this. Anyone have an idea what's going on?</p>