title: Link to specific stdc++ library
body: <p>I have a c++ application which I am trying to build under Linux, it needs to be linked to a third party shared library, however this library has been built with a quite recent version of GCC/glibc (4.8.3/2.18). When I try and build my application using a less recent version of GCC/glibc (4.4.7/2.12), the linked phase of the build fails, with ld complaining of undefined references, which are references to functions defined in the newer libstdc++. </p>
  
  <p>The third party has given me a precompiled version of libstdc++ and libgcc_s to use with the library, but how do I use these versions in my build? </p>
  
  <p>How do I tell GCC to use the precompiled libraries instead of the system ones, while still using the system GCC?</p>
  
  <p>I have tried using the "-nodefaultlibs" option and including "-lstdc++" and "-L" options, but it seems to have no effect on the undefined references.</p>
  
  <p>Example of an error I get during linking:</p>
  
  <p><code>undefined reference to std::__throw_bad_function_call()@GLIBCXX_3.4.14'
  undefined reference to std::length_error::~length_error()@GLIBCXX_3.4.15'</code></p>