安装opencv4.4时出现错误 error: ‘sleep_for’ is not a member of ‘std::this_thread‘

查看报错信息:

/home/changym/sources/opencv-4.4.0/modules/gapi/test/gapi_async_test.cpp:448:26: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  448 |        std::this_thread::sleep_for(std::chrono::milliseconds{2});
      |                          ^~~~~~~~~

根据报错信息, 在 gapi_async_tesr.cpp 中添加:

#include 

再次编译,成功。

你可能感兴趣的:(C++,opencv,c++)