Ask Your Question
0

Installation Error

asked 2017-03-15 13:48:13 -0600

Amirali gravatar image

updated 2017-03-18 14:06:26 -0600

hi, i'm trying to install the OpenCV on windows 7 but I'm reaching an error which says mutex and thread is not a member of std. I've downloaded both opencv and it's contribs and unzipped them in the root/opencv/source direction. first i generated it with cmake afterward i tried to use the command:

make -j5

in order to compile it, but, I'm facing with the error of:

c:\ROOT\opencv\opencv>cd c://root/opencv/opencv && make -j5
[  2%] Built target zlib
[  6%] Built target libtiff
[ 10%] Built target libjpeg
[ 15%] Built target libwebp
[ 19%] Built target libjasper
[ 21%] Built target libpng
[ 27%] Built target IlmImf
[ 27%] Built target opencv_core_pch_dephelp
[ 28%] Built target pch_Generate_opencv_core
[ 33%] Built target opencv_core
[ 33%] Built target opencv_test_core_pch_dephelp
[ 33%] Built target pch_Generate_opencv_test_core
[ 33%] Built target opencv_imgproc_pch_dephelp
[ 33%] Built target pch_Generate_opencv_imgproc
[ 38%] Built target opencv_imgproc
[ 38%] Built target opencv_videoio_pch_dephelp
[ 38%] Built target pch_Generate_opencv_videoio
[ 38%] Built target opencv_imgcodecs_pch_dephelp
[ 38%] Built target pch_Generate_opencv_imgcodecs
[ 40%] Built target opencv_imgcodecs 
[ 41%] Built target opencv_videoio
[ 41%] Built target opencv_highgui_pch_dephelp
[ 41%] Built target pch_Generate_opencv_highgui
[ 41%] Built target opencv_highgui
[ 41%] Built target opencv_ts_pch_dephelp
[ 41%] Built target pch_Generate_opencv_ts
[ 42%] Built target opencv_ts
[ 45%] Built target opencv_test_core
[ 45%] Built target opencv_perf_core_pch_dephelp
[ 45%] Built target pch_Generate_opencv_perf_core
[ 48%] Built target opencv_perf_core
[ 48%] Built target opencv_flann_pch_dephelp
[ 48%] Built target pch_Generate_opencv_flann
[ 49%] Built target opencv_flann
[ 49%] Built target opencv_test_flann_pch_dephelp
[ 49%] Built target pch_Generate_opencv_test_flann
[ 50%] Built target opencv_test_flann
[ 50%] Built target opencv_perf_imgproc_pch_dephelp
[ 50%] Built target opencv_test_imgproc_pch_dephelp
[ 50%] Built target pch_Generate_opencv_test_imgproc
[ 54%] Built target opencv_test_imgproc
[ 54%] Built target pch_Generate_opencv_perf_imgproc
[ 58%] Built target opencv_perf_imgproc
[ 58%] Built target opencv_test_ml_pch_dephelp
[ 58%] Built target pch_Generate_opencv_test_ml
[ 58%] Built target opencv_ml_pch_dephelp
[ 59%] Built target pch_Generate_opencv_ml
[ 61%] Built target opencv_ml
[ 62%] Built target opencv_test_ml
[ 63%] Built target opencv_photo_pch_dephelp
[ 63%] Built target pch_Generate_opencv_photo
[ 64%] Built target opencv_photo
[ 64%] Built target opencv_perf_photo_pch_dephelp
[ 64%] Built target pch_Generate_opencv_perf_photo
[ 65%] Built target opencv_perf_photo
[ 65%] Built target opencv_test_photo_pch_dephelp
[ 65%] Built target pch_Generate_opencv_test_photo
[ 66%] Built target opencv_test_photo
[ 66%] Built target opencv_video_pch_dephelp
[ 67%] Built target pch_Generate_opencv_video
[ 69%] Built target opencv_video
[ 69%] Built target opencv_test_video_pch_dephelp
[ 69%] Built target pch_Generate_opencv_test_video
[ 70%] Built target opencv_test_video
[ 70%] Built target opencv_perf_video_pch_dephelp
[ 71%] Built target pch_Generate_opencv_perf_video
[ 72%] Built target opencv_perf_video
[ 72%] Built target opencv_test_imgcodecs_pch_dephelp
[ 72%] Built target opencv_perf_imgcodecs_pch_dephelp
[ 73%] Built target pch_Generate_opencv_test_imgcodecs
[ 74%] Built target opencv_test_imgcodecs
[ 75%] Built target pch_Generate_opencv_perf_imgcodecs
[ 75%] Built target opencv_perf_imgcodecs
[ 75%] Built target opencv_shape_pch_dephelp
[ 75%] Built target pch_Generate_opencv_shape
[ 75%] Built target opencv_shape
[ 76%] Built target opencv_test_shape_pch_dephelp
[ 77%] Built target pch_Generate_opencv_test_shape
[ 77%] Built target opencv_test_shape
[ 77%] Built target opencv_test_videoio_pch_dephelp
[ 77%] Built target pch_Generate_opencv_test_videoio
[ 78%] Built target opencv_test_videoio
[ 78%] Built target opencv_perf_videoio_pch_dephelp
[ 78%] Built target pch_Generate_opencv_perf_videoio
[ 79%] Built target opencv_perf_videoio
[ 79%] Built target opencv_test_highgui_pch_dephelp
[ 79%] Built target pch_Generate_opencv_test_highgui
[ 79%] Built target opencv_test_highgui
[ 79%] Built target opencv_perf_objdetect_pch_dephelp
[ 79%] Built target opencv_objdetect_pch_dephelp
[ 79%] Built target pch_Generate_opencv_objdetect
[ 79%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_tracker.cpp.obj
C:\ROOT\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:175:14: error: 'thread' in namespace 'std' does not name a type
         std::thread second_workthread;
              ^~~~~~
C:\ROOT\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:176:14: error: 'mutex' in ...
(more)
edit retag flag offensive close merge delete

Comments

Which compiler do you use (Visual Studio?)? At first glance, looks like your compiler does not support C++11.

Eduardo gravatar imageEduardo ( 2017-03-15 13:58:11 -0600 )edit

I don't have access to visual studio, how can i alter the compiler?

Amirali gravatar imageAmirali ( 2017-03-15 14:50:23 -0600 )edit

I have used mingw to compile but it's again having the same error.

Amirali gravatar imageAmirali ( 2017-03-15 15:16:47 -0600 )edit
1

With MinGW, you should be able to compile with C++11 support with: -std=c++11.

Eduardo gravatar imageEduardo ( 2017-03-16 05:17:07 -0600 )edit

no, i used mingw and ming64 but they were having the same problem.

Amirali gravatar imageAmirali ( 2017-03-18 14:05:43 -0600 )edit
2

what does cerr << __cplusplus << endl; print ?

seems to be a weird case of mingw passing the test here , but still does not have std::thread

berak gravatar imageberak ( 2017-03-19 02:08:49 -0600 )edit

It is showing 201402

Amirali gravatar imageAmirali ( 2017-03-21 11:33:23 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-04-06 03:16:50 -0600

Amirali gravatar image

updated 2017-04-06 03:18:08 -0600

Hi, It was fixed by using TDM-gcc mingw compiler

edit flag offensive delete link more

Comments

Hi. I have the same issue. How did you apply the tdm-gcc mingw compiler? I have downloaded it and am at a lost as to what to do next.

Peanut gravatar imagePeanut ( 2017-05-02 09:29:33 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-15 13:48:13 -0600

Seen: 2,151 times

Last updated: Apr 06 '17