Ошибка MinGW: «поток» не является членом «стандартного»
Я пытаюсь кросс-компилировать для Windows простое приложение:
#include
void Func(){
return;
}
int main(){
std::thread thr1(Func);
thr1.detach();
return 0;
}
И этоЧто я получаю:
$ 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
На самом деле, этот код не имеет такой проблемы, если компилируется с g ++ для Ubuntu; но мне нужно кросс-компилировать для Windows, и здесь яЯ застрял.