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).
Thank you.
回答1:
You also need to link against -pthread. If you use g++ main.cpp -std=c++0x -pthread you are doing all that in one step, so it works correctly. To make Qt do the correct things, add the following to your project file: