title: C++11 thread support in Qt Creator 2.7.0 (Qt 5.0.2)
body: <p>I am trying to make threads work in Qt Creator under Ubuntu. I set the</p>
  
  <pre><code>QMAKE_CXXFLAGS += -std=c++11 -pthread -lpthread  
  CXXFLAGS += -std=c++11 -pthread -lpthread
  </code></pre>
  
  <p>but it still wont work and will write</p>
  
  <pre><code>terminate called after throwing an instance of ‘std::system_error’ 
    what(): Operation not permitted
  </code></pre>
  
  <p>The file I try to compile is this</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;thread&gt;
  using namespace std;
  
  void fun(){
  }
  
  int main()
  {
      thread th(&amp;fun);
      cout &lt;&lt; "Hello World!" &lt;&lt; endl;
      return 0;
  }
  </code></pre>