n7tae / mvoice

A prototype M17 voice application for ham radio
GNU General Public License v2.0
57 stars 14 forks source link

error: ‘sleep_for’ is not a member of ‘std::this_thread’ #9

Closed sa5bke closed 3 years ago

sa5bke commented 3 years ago

I am using Fedora 34 and gcc-c++-11.1.1 and I got this error when running make:

AudioManager.cpp: In member function ‘void CAudioManager::audio2codec(bool)’:
AudioManager.cpp:75:43: error: ‘sleep_for’ is not a member of ‘std::this_thread’
   75 |                         std::this_thread::sleep_for(std::chrono::milliseconds(3));
      |                                           ^~~~~~~~~

To solve it I added #include <thread> to AudioManager.cpp.

n7tae commented 3 years ago

Thanks. Fixed.