C++11 thread support in Qt Creator 2.7.0 (Qt 5.0.2)
-
I am trying to make threads working under Ubuntu. I set the
QMAKE_CXXFLAGS += -std=c++11 -pthread -lpthread
but it still wont work and will write
"terminate called after throwing an instance of 'std::system_error'
what(): Operation not permitted"How to make it work?
-
Have you specified pthread at the list of libraries to be linked into your project?
@
LIBS += -pthread
@ -
Thank you, that was it.
-
[quote author="Slazer" date="1368749080"]No I have not, but I have tried it now and there is no change. I have also tried
@LIBS += -lpthread@
with no success.[/quote]
Did you make a clean build of your project after the update of the .pro file?
-
Sorry I did not make a clean build. It works now, thanks.
-
[quote author="Slazer" date="1368749695"]Sorry I did not make a clean build. It works now, thanks.[/quote]
Nice :) You are welcome