MinGW make error in detection_based_tracker.cpp
OS : Windows 8.1 64bit Embedded edition MinGW-make : 3.82.90 (i686) Cmake : 3.9.2
Error :
C:\Users\john\Desktop\opencv-master\opencv-master\release>mingw32-make [ 0%] Built target gen-pkgconfig [ 2%] Built target zlib [ 5%] Built target libtiff [ 9%] Built target libjpeg [ 19%] Built target libwebp [ 22%] Built target libjasper [ 24%] Built target libpng [ 30%] Built target IlmImf [ 36%] Built target libprotobuf [ 41%] Built target opencv_core [ 46%] Built target opencv_imgproc [ 48%] Built target opencv_imgcodecs [ 49%] Built target opencv_videoio [ 49%] Built target opencv_highgui [ 50%] Built target opencv_ts [ 52%] Built target opencv_test_core [ 55%] Built target opencv_perf_core [ 56%] Built target opencv_flann [ 56%] Built target opencv_test_flann [ 60%] Built target opencv_test_imgproc [ 63%] Built target opencv_perf_imgproc [ 64%] Built target opencv_ml [ 65%] Built target opencv_test_ml [ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src /detection_based_tracker.cpp.obj C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:175:14: error: 'thread' in namespace 'std' does not name a t ype std::thread second_workthread; ^~~~~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:176:14: error: 'mutex' in namespace 'std' does not name a ty pe std::mutex mtx; ^~~~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:177:14: error: 'condition_variable' in namespace 'std' does not name a type std::condition_variable objectDetectorRun; ^~~~~~~~~~~~~~~~~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:178:14: error: 'condition_variable' in namespace 'std' does not name a type std::condition_variable objectDetectorThreadStartStop; ^~~~~~~~~~~~~~~~~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::Separat eDetectionWork::setParameters(const cv::DetectionBasedTracker::Parameters&)': C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:143:30: error: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:143:30: error: 'mutex' is not a member of 'std' C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:143:40: error: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:143:51: error: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:143:42: warning: unused variable 'mtx_lock' [-Wunused-variab le] std::unique_lock<std::mutex> mtx_lock(mtx); ^~~~~~~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::Separat eDetectionWork::init()': C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:156:30: error: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:156:30: error: 'mutex' is not a member of 'std' C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:156:40: error: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\Users\john\Desktop\opencv-master\opencv-master\modules\objdetect\src\detectio n_based_tracker.cpp:156:51: error ...
there's not much love for mingw left with the opencv devs ;(
for now, try adding
-DWINCE
to the CPPFLAGS in cmake(mingw defines _WIN32, but it's never checked there, only WINCE .)
((yes, it's a crappy duct-tape-fix))
did you solve the problem?