c++11 - How to enable C++ multithreading? -


i've been trying multithreaded c++. installed new dev c++ 5.4.1 , added -std=c++11 compiler options. added #include <thread> somewhere in source code, , std::thread mythread (some_func).

when compile source file, compiler error "thread defined in scope".

what have have working?

official build of mingw (that compiler dev-c++ uses) has no support standard library threads now.

you can use boost::thread drop in replacement (api similiar enough) or use microsoft visual c++, or try programming g++ on linux (this have done recently, using virtual machine).


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

How to call a javascript function after the page loads with a chrome extension? -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -