error: ‘sleep_for’ is not a member of ‘std::this_thread’ + 安装opencv 4.5.1

错误信息

opencv/modules/gapi/test/gapi_async_test.cpp: In member function ‘virtual void opencv_test::gtest_case_output_args_lifetime_::callback::TestBody()’:
opencv/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});
      |                          ^~~~~~~~~

解决方案:

Try to add #include  into this file (gapi_async_test.cpp or test_precomp.hpp).


 

你可能感兴趣的:(opencv,visual,C++,opencv,人工智能,计算机视觉)