title: c++11 future compilation error
body: <p>For the following code written in c++11 and c++14 </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;future&gt;
  
  
  using namespace std;
  
  
  int main()
  {
      vector &lt; future&lt;int&gt; &gt; futures;
      for(int i =0; i&lt;10; i++)
      {
          futures.push_back( async([](auto j){return j*2;} ,i));
      }
  
  for(auto &amp;e : futures)
  {
      cout &lt;&lt; e.get() &lt;&lt; endl;
  }
  return 1;
  }
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>/tmp/ccO0BfSt.o: In function `_ZNSt6threadC2IZNSt13__future_base17_Async_state_implISt12_Bind_simpleIFZ4mainEUliE_iEEiEC4EOS6_EUlvE_IEEEOT_DpOT0_': c14_features.cpp:(.text+0x1d92): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status</p>
  </blockquote>
  
  <p>Any idea why I am getting this??</p>