Hi,
ich versuche gerade auf meinem Laptop OpenCv zu installieren. Dabei habe ich mich an folgende Anleitung gehalten: https://kevinhughes.ca/tutorials/ope...ocks-and-mingw
Ich komme bis zu dem "mingw32-make" Command, doch da bricht er dann ab:
Nun hab ich natürlich schon etwas rumgesucht und hab auch was gefunden, was IMHO mein Problem beseitigen würde:Code:[ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src /detection_based_tracker.cpp.obj C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:175:14: erro r: 'thread' in namespace 'std' does not name a type std::thread second_workthread; ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:176:14: erro r: 'mutex' in namespace 'std' does not name a type std::mutex mtx; ^~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:177:14: erro r: 'condition_variable' in namespace 'std' does not name a type std::condition_variable objectDetectorRun; ^~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:178:14: erro r: 'condition_variable' in namespace 'std' does not name a type std::condition_variable objectDetectorThreadStartStop; ^~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'void cv::DetectionBasedTracker::SeparateDetectionWork::setParameters(co nst cv::DetectionBasedTracker::Parameters&)': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:143:30: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:143:30: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:143:40: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:143:51: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:143:42: warn ing: unused variable 'mtx_lock' [-Wunused-variable] std::unique_lock<std::mutex> mtx_lock(mtx); ^~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'void cv::DetectionBasedTracker::SeparateDetectionWork::init()': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:156:30: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:156:30: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:156:40: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:156:51: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:164:13: erro r: 'objectDetectorThreadStartStop' was not declared in this scope objectDetectorThreadStartStop.notify_one(); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:156:42: warn ing: unused variable 'mtx_lock' [-Wunused-variable] std::unique_lock<std::mutex> mtx_lock(mtx); ^~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In destruct or 'virtual cv::DetectionBasedTracker::SeparateDetectionWork::~SeparateDetection Work()': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:254:5: error : 'second_workthread' was not declared in this scope second_workthread.join(); ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'bool cv::DetectionBasedTracker::SeparateDetectionWork::run()': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:261:22: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:261:22: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:261:32: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:261:43: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:275:5: error : 'second_workthread' was not declared in this scope second_workthread = std::thread(workcycleObjectDetectorFunction, (void*)thi s); //TODO: add attributes? ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:275:25: erro r: 'thread' is not a member of 'std' second_workthread = std::thread(workcycleObjectDetectorFunction, (void*)thi s); //TODO: add attributes? ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:276:5: error : 'objectDetectorThreadStartStop' was not declared in this scope objectDetectorThreadStartStop.wait(mtx_lock); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'void cv::DetectionBasedTracker::SeparateDetectionWork::workcycleObjectD etector()': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:317:22: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:317:22: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:317:32: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:317:43: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:323:9: error : 'objectDetectorThreadStartStop' was not declared in this scope objectDetectorThreadStartStop.notify_one(); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:330:9: error : 'objectDetectorRun' was not declared in this scope objectDetectorRun.wait(mtx_lock); ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:340:14: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:357:22: erro r: request for member 'lock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.lock(); ^~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:364:26: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:372:13: erro r: 'objectDetectorRun' was not declared in this scope objectDetectorRun.wait(mtx_lock); ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:380:22: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:431:18: erro r: request for member 'lock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.lock(); ^~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:447:18: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'void cv::DetectionBasedTracker::SeparateDetectionWork::stop()': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:462:20: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:462:20: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:462:30: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:462:41: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:468:18: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:479:5: error : 'objectDetectorRun' was not declared in this scope objectDetectorRun.notify_one(); ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:480:5: error : 'objectDetectorThreadStartStop' was not declared in this scope objectDetectorThreadStartStop.wait(mtx_lock); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:482:14: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'void cv::DetectionBasedTracker::SeparateDetectionWork::resetTracking()' : C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:495:22: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:495:22: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:495:32: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:495:43: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:512:14: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp: In member f unction 'bool cv::DetectionBasedTracker::SeparateDetectionWork::communicateWithD etectingThread(const cv::Mat&, std::vector<cv::Rect_<int> >&)': C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:533:22: erro r: 'mutex' is not a member of 'std' std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:533:22: erro r: 'mutex' is not a member of 'std' C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:533:32: erro r: template argument 1 is invalid std::unique_lock<std::mutex> mtx_lock(mtx); ^ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:533:43: erro r: 'mtx' was not declared in this scope std::unique_lock<std::mutex> mtx_lock(mtx); ^~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:566:9: error : 'objectDetectorRun' was not declared in this scope objectDetectorRun.notify_one(); ^~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\objdetect\src\detection_based_tracker.cpp:573:14: erro r: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int' mtx_lock.unlock(); ^~~~~~ modules\objdetect\CMakeFiles\opencv_objdetect.dir\build.make:118: recipe for tar get 'modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_track er.cpp.obj' failed mingw32-make[2]: *** [modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/dete ction_based_tracker.cpp.obj] Error 1 CMakeFiles\Makefile2:2117: recipe for target 'modules/objdetect/CMakeFiles/openc v_objdetect.dir/all' failed mingw32-make[1]: *** [modules/objdetect/CMakeFiles/opencv_objdetect.dir/all] Err or 2 Makefile:161: recipe for target 'all' failed mingw32-make: *** [all] Error 2
https://github.com/meganz/mingw-std-threads
Nur leider verstehe ich die "Anleitung" nicht, also ich weiß nicht, wie ich diese Dateien nutzen soll.... Irgendwo hinkopieren, ersetzen, etc..
Also auf dem Laptop läuft Win7 (64Bit), ich will OpenCV mit CodeBlocks nutzen. Der Rest ist mir eig egal, ich würde das auch schon vorcompiliert nehmen, aber das scheint es ja nicht zu geben?!
Sorry für die blöde Fragerei, aber was PC-Sachen angeht, hab ich wenig Ahnung.
Hoffentlich weiß jemand von Euch, wie ich mein Problem beseitigen kann.
Vielen Dank & Gruß
Chris







Zitieren

Lesezeichen