When I try to use the c++11 thread library in Netbeans (g++ 4.8.2 ubuntu 14.04 LTS) I get the following error:
##Failure Location unknown## : Error Test name: Array2DTest::testArray2D uncaught exception of type std::system_error - Enable multithreading to use std::thread: Operation not permitted
I tried enabling pthreads by adding -pthread as a additional option for the compilation line as suggested by similar questions and the output seems to show the option is getting passed:
I've also tried compiling simple "hello world" type tests directly from the terminal and they actually work! For some reason I just can't get netbeans to enable it. The only thing I can think of is I'm trying to test out some multithreading functions in a cppunit test so is it possible this is messing up the pthread option?
Aucun commentaire:
Enregistrer un commentaire