Posts

GCC, std::thread – type ‘sleep_for’ is not a member of ‘std::this_thread’

If you are trying to use sleep_for() in the standard C++ thread library via GCC and are getting an error like the following:

 

‘sleep_for’ is not a member of ‘std::this_thread’

 

The you may have to define the following symbol:

 

More information can be found here.