[MinGW-Users] Can't build opencv : 'recursive_mutex' in namespace 'std' does not name a type

Back to archive index
Roy Qu royqh****@gmail*****
Sat Dec 26 12:50:53 JST 2020


I'm trying to build opencv using mingw gcc 9.2, and i got the following
message:

[  6%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.obj
In file included from
F:\Temp\test\opencv-4.5.1\modules\core\src\precomp.hpp:49,
                 from
F:\Temp\test\opencv-4.5.1\modules\core\src\algorithm.cpp:43:
F:/Temp/test/opencv-4.5.1/modules/core/include/opencv2/core/utility.hpp:706:14:
error: 'recursive_mutex' in namespace 'std' does not name a type
  706 | typedef std::recursive_mutex Mutex;
      |              ^~~~~~~~~~~~~~~
F:/Temp/test/opencv-4.5.1/modules/core/include/opencv2/core/utility.hpp:63:1:
note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget
to '#include <mutex>'?

So what should I do to get it worked?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20201226/ee8272ac/attachment.html>


More information about the MinGW-Users mailing list
Back to archive index