How to use pthread on Qt Creator
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to execute a following code. #include #include void output () { std :: cout << "Hello World" << std :: endl ; } int main () { std :: thread t ( output ); t . join (); return 0 ; } I can't execute it. Qt Creator outputs terminate called after throwing an instance of 'std::system_error' what(): Operation not permitted However I can execute on the terminal using the option of -pthread. Could you tell me how to use the option of -pthread in Qt Creator? My developing environment is Ubuntu(12.04), g++4.6.3, Qt Creator(2.4.1).