title: cross-compiling c++11 threads with mingw on linux
body: <p>I try to crosscompile some c++11 source with mingw on linux for windows. The code uses std::thread.</p>
  
  <p>When i compile i always get some errors:</p>
  
  <pre><code>$ ../mingw/cross/bin/i686-w64-mingw32-g++  -std=c++11 -I include/ test.cpp -lstdthread -otest
  In file included from test.cpp:4:0:
  ...
  error: 'thread' in namespace 'std' does not name a type
  ...
  </code></pre>
  
  <p>I it possible to enable c++11 threads in mingw? The code compiles without any problems with the local g++.</p>
  
  <p>Thank you,</p>
  
  <p>regars
  Kevin</p>
  
  <p>-edit-</p>
  
  <p>I just downloaded the mingw somewhere in the internet, because i tried to get an as new as possible version:</p>
  
  <pre><code>../mingw/cross/bin/i686-w64-mingw32-g++  -v
  Using built-in specs.
  COLLECT_GCC=../mingw/cross/bin/i686-w64-mingw32-g++
  COLLECT_LTO_WRAPPER=/home/bmeier/source/mingw/cross/bin/../libexec/gcc/i686-w64-mingw32/4.8.1/lto-wrapper
  Target: i686-w64-mingw32
  Configured with: /home/drangon/work/mingw-w64-dgn_32/source/gcc-4.8.1/configure --target=i686-w64-mingw32 --disable-nls --disable-multilib --with-gmp=/home/drangon/work/mingw-w64-dgn_32/build/for_cross --with-mpfr=/home/drangon/work/mingw-w64-dgn_32/build/for_cross --with-mpc=/home/drangon/work/mingw-w64-dgn_32/build/for_cross --with-isl=/home/drangon/work/mingw-w64-dgn_32/build/for_cross --with-cloog=/home/drangon/work/mingw-w64-dgn_32/build/for_cross --enable-languages=c,c++,objc,obj-c++ --disable-libstdcxx-pch --prefix=/home/drangon/work/mingw-w64-dgn_32/cross --with-sysroot=/home/drangon/work/mingw-w64-dgn_32/cross
  Thread model: win32
  gcc version 4.8.1 (GCC)
  </code></pre>
  
  <p>regards
  Kevin</p>