title: Getting error: 'mutex' in namespace 'std' does not name a type in MinGW mysys prompt
body: <p>I have downloaded MinGW from the official website and installed it on my Windows 8.1 machine.</p>
  
  <p>Running g++ --version gives me g++.exe (GCC) 4.8.1.</p>
  
  <p>I am trying to compile the existing codebase in MinGW compiler but it is failing with the following error:</p>
  
  <pre><code>error: 'mutex' in namespace 'std' does not
  name a type
       private: std::mutex m_Mutex;
                ^
  error: 'condition_variable' in namespace 's
  </code></pre>
  
  <p>and many more errors related to locking and threading.!</p>
  
  <p>I was able to compile the same codebase in Cygwin-64 without any issues.
  I need to build and compile successfully in MinGW in order to create some .dll files which would be compatible on MSVS.!</p>
  
  <p>I have already referred the following links , but i couldn't get through the solution.</p>
  
  <p><a href="https://stackoverflow.com/questions/17551722/getting-stdthread-mutex-to-work-under-win7-with-mingw-and-g-4-7-2">Getting std::thread/mutex to work under Win7 with mingw and g++ 4.7.2</a><br>
  <a href="https://stackoverflow.com/questions/24009821/mingw-4-8-1-c11-thread-support">MinGW 4.8.1 C++11 thread support</a></p>
  
  <p>Your help would be greatly appreciated. Thanks.</p>