title: Gcc searches for header files under the wrong directory
body: <p>I have two versions of gcc/g++ installed: gcc-4.5(installed from package manager, binary files are under /usr/bin, header files are under /usr/include) and gcc-4.4.3(compiled by myself, put under /opt/gcc-4.4.3).</p>
  
  <p>When I made gcc/g++ 4.4.3 to be the default version (using "update-alternatives" to make /usr/bin/gcc and /usr/bin/g++ point to the corresponding one under directory "/opt/gcc-4.4.3/bin") and compiled the files, it always reported the following errors:</p>
  
  <blockquote>
    <p>/usr/include/c++/4.5/bits/basic_string.h:1659: undefined reference to
    `std::basic_string,
    std::allocator::_S_construct_aux_2(unsigned long, char,
    std::allocator const&amp;)'</p>
  </blockquote>
  
  <p>It seems that the compiler is trying to find the header files for c++ under /usr/include/c++/4.5, which causes the link error. When I changed the default version of gcc to gcc-4.5, the errors disappeared.</p>
  
  <p>So how could I make the compiler search for the header files under the correct directory "/opt/gcc-4.4.3/include"? I have tried to export CPLUS_INCLUDE_PATH, but it seems not work. </p>
  
  <p>PS: gcc -v</p>
  
  <pre><code>Using build-in specs
  Target: x86_64-suse-linux
  Configured with: ./configure --prefix=/opt/gcc-4.4.3
  Thread model: posix
  gcc version 4.4.3 (GCC)
  </code></pre>