Erreur MinGW: 'thread' n'est pas membre de 'std'

Je suis en train de cross-compiler pour Windows est une application simple:

#include <thread>

void Func(){
  return;
}

int main(){
  std::thread thr1(Func);
  thr1.detach();
  return 0;
}

Et c'est ce que j'obtiens:

$ i686-w64-mingw32-g++ -static-libstdc++ -static-libgcc -pipe -g -std=c++0x ./threadstutor.cpp 
./threadstutor.cpp: In function int main()’:
./threadstutor.cpp:8:3: error: thread is not a member of std
./threadstutor.cpp:8:15: error: expected ‘;’ before thr1
./threadstutor.cpp:9:3: error: thr1 was not declared in this scope

En fait, ce code n'ont pas ce problème si compiler avec g++ pour Ubuntu; mais j'ai besoin de cross-compiler pour Windows, et là je suis coincé.

source d'informationauteur Hi-Angel