title: How can i compile c++ with openmp? (using g++ in windows 10)
body: <p>i'm new in c++ programming. Also new in openMP.
  I have this simple code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;omp.h&gt;
  
  int main(int argc, char const *argv[])
  {
      #pragma omp parallel
      printf("This is thread %d out of %d\n", omp_get_thread_num(), omp_get_num_threads());
      return 0;
  }
  </code></pre>
  
  <p>when i try to compile it using </p>
  
  <pre><code>g++ -fopenmp file_name.cpp
  </code></pre>
  
  <p>in the cmd, i get this error</p>
  
  <pre><code>c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot 
  find -lpthread collect2.exe: error: ld returned 1 exit status
  </code></pre>
  
  <p>I use windows 10, and the gcc version is 6.3.0.
  How can i fix this?
  thanks</p>