title: Linking to libstdc++ version which has been used on the build system
body: <p>I have prepared a simple c++14 example which contains a generic lambda:</p>
  
  <pre><code>auto glambda = [](auto a) { return a; };
  </code></pre>
  
  <p>I have used gcc 4.9.2 (libstdc++.so.6.0.20) to built that program. Here is <strong>ldd</strong> output:</p>
  
  <pre><code>linux-vdso.so.1 =&gt;  (0x00007ffca3d14000)
  libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcc6062d000)
  libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcc60417000)
  libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcc601f9000)
  libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc5fe2f000)
  libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcc5fb27000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fcc6093c000)
  </code></pre>
  
  <p>When I run that program on the other system (virtual machine) which is equipped with gcc 4.6.3 (libstdc++.so.6.0.16) it works. Some programs don't start on the other system because there is not appropriate libstdc++. I have guessed that my program will not work because it uses c++14 feature which is not supported by gcc 4.6.3. How does it work ? When a program need link to libstdc++ which has been used on the build system ? </p>