title: replacing default old boost 1.46 with 1.50
body: <p>I got a new installation of Ubuntu 11.10 and kernel version 3.0.0-23-generic and +/- by default I get the following version 1.46.1 of Boost which is installed under <code>/usr/include/boost</code> and <code>/usr/lib</code>:</p>
  
  <pre><code>bravegag@Zeus:~/code/roofline/tool$ dpkg --get-selections | grep boost
  libboost-date-time1.46.1        install
  libboost-dev                    install
  libboost-iostreams1.46.1        install
  libboost-program-options1.46.1  install
  libboost-serialization1.46.1    install
  libboost-thread1.46.1           install
  libboost1.46-dev                install
  </code></pre>
  
  <p>I could try updating it by the standard Ubuntu means but this will most likely imply I need to get some third party ppa and pull as side effect lot of crap that will make my system unstable and I do not want that. So I installed Boost 1.50 from source and it was installed under <code>/usr/local/include/boost</code> and <code>/usr/local/lib</code>. </p>
  
  <p>A CMake project I have picks up the 1.50 version no problems. However, a tool I am using that compiles and links using the "default" system settings ends up picking the 1.46.1 version and results in the error message <code>src/utils.h:17:25: error: ‘boost::BOOST_FOREACH’ has not been declared</code> so obviously is not picking the 1.50 version.</p>
  
  <p>I tried overwriting the default g++/gcc Boost version like this:</p>
  
  <pre><code>export CPLUS_INCLUDE_PATH=/usr/local/include/boost/:$CPLUS_INCLUDE_PATH   
  export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
  </code></pre>
  
  <p>but this doesn't do the trick either ... my question is can I not simply sweep out all those old Boost 1.46 installations and move over to the default <code>/usr/include</code> and <code>/usr/lib</code> the 1.50 installation? would doing this cause my system to break? I don't want to risk another re-installation spree.</p>