lundi 9 mars 2015

How to get the mutlithreaded working in CodeBlocks?

I have code which uses multithread ability of C++11. I am able to execute the code in the terminal using the command:


g++ main.cpp -o main -pthread -std=c++11


But I am unable to execute the same code from the CodeBlocks. Whenever I attempt to do it, it throws the error : terminate called after throwing an instance of std::system_error what(): Enable multithreading....


I know that Codeblocks, is building the code without '-pthread' in it, but I dont know to add that in CodeBlocks. So can somebody help me with this?


Aucun commentaire:

Enregistrer un commentaire