우분투에서 Qt Creator에서 스레드를 작동 시키려고합니다. 나는Qt Creator 2.7.0 (Qt 5.0.2)에서 C++ 11 스레드 지원
QMAKE_CXXFLAGS += -std=c++11 -pthread -lpthread
CXXFLAGS += -std=c++11 -pthread -lpthread
설정하지만 여전히 일을 못해 내가 컴파일 할 파일 내가 MyProject를 다음 줄을 추가했다이
#include <iostream>
#include <thread>
using namespace std;
void fun(){
}
int main()
{
thread th(&fun);
cout << "Hello World!" << endl;
return 0;
}
로 지금 작동? – phyatt
있습니다. 나는 내 질문에 이미 대답했다. – Slazer