title: Visual Studio 2017 linux can't compile if there's std::thread
body: <p>So I'm trying to use Visual Studio 2017 to create a Linux project.
  I started out with an Empty Linux Project (as the project template), and so far everything is fine.</p>
  
  <p>However, if I have</p>
  
  <pre><code>// Create a new thread for the connection to avoid clutter
  std::thread newConnectionHandler(connectionHandler, iNewConnection);
  newConnectionHandler.detach();
  </code></pre>
  
  <p>in my code, it won't compile. These are the errors that I get:</p>
  
  <pre><code>Error       E0020   identifier "__float128" is undefined
  Error       In function `std::thread::thread&lt;void(&amp;)(int), int&amp;&gt;(void(&amp;)(int), int&amp;)':
  Error       undefined reference to `pthread_create'
  Error       ld returned 1 exit status
  </code></pre>
  
  <p>But as soon as I comment out the <code>std::thread</code> stuff, it compiles.</p>
  
  <p><strong>Here's what I've tried so far:</strong></p>
  
  <ul>
  <li>C/C++ -> Additional Options -> Added <code>-pthread -lpthread</code> or just <code>-pthread</code></li>
  <li>Linker -> Additional Options -> Added <code>-pthread -lpthread</code> or just <code>-pthread</code></li>
  <li>Linker -> Library Dependencies -> Added <code>thread</code></li>
  <li>Switching C++ Language standard between C++17 and C++11</li>
  </ul>
  
  <p>And of course I've tried multiple variations of those changes, but I always get the same error.</p>
  
  <p>And my includes are:</p>
  
  <pre><code>#include &lt;sys/socket.h&gt;
  #include &lt;netinet/in.h&gt;
  #include &lt;arpa/inet.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string&gt;
  #include &lt;thread&gt;
  </code></pre>
  
  <p>EDIT:
  Here's also the declaration of <code>connectionHandler</code>:</p>
  
  <pre><code>void connectionHandler(int iConnection)
  </code></pre>
  
  <p>And when passing <code>iNewConnection</code>, the datatype is an <code>int</code>.</p>