title: Boost Compilation Issues
body: <p>I am very very new to boost.  As I understand it, boost::mutex has both members lock() and unlock().  However I am getting the following error messages regarding the function that follows them.  I ran the 'sudo apt-get install libboost-dev' command within the same folder the source code.  This also my professors code which was given to the students.  I'm certain that it should be compiling correctly.  Any help would be great!</p>
  <p>Error Messages:</p>
  <blockquote>
  <p>matrix.cc: In function ‘<code>void p_scalarproduct_t(int*, int*, int*, int, int, boost::mutex*)</code>’:</p>
  <p>matrix.cc:75: error: ‘<code>class boost::mutex</code>’ has no member named ‘<code>lock</code>’</p>
  <p>matrix.cc:77: error: ‘<code>class boost::mutex</code>’ has no member named ‘<code>unlock</code>’</p>
  <p>matrix.cc: In function ‘<code>int p_scalarproduct(int*, int*, int, int)</code>’:</p>
  <p>matrix.cc:91: error: ‘<code>bind</code>’ is not a member of ‘<code>boost</code>’</p>
  </blockquote>
  <p>Code:</p>
  <pre><code>void p_scalarproduct_t(int* c, int* a, int* b, 
                         int s, int e, boost::mutex* lock)
  { 
      int tmp;
  
      tmp = 0;
      for (int k = s; k &lt; e; k++)
          tmp += a[k] * b[k];
  
      lock-&gt;lock();
      *c = *c + tmp;
      lock-&gt;unlock();
  }
  </code></pre>