我正在尝试使用opencv_contrib安装opencv 我从同一个分支的GitHub(3.4)下载了opencv和opencv_contrib 我用cmake构建了opencv和opencv_contrib,evrey的工作正常。但是当我尝试构建Opencv.sln时出现错误,并且并非所有模块都已构建(我需要opencv_tracking模块) 这是我遇到的错误:
enter Error 437 error C2039: 'isfinite' : is not a member of 'std'
C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 150 1 opencv_tracking
Error 46 error C2054: expected '(' to follow 'inline' C:\opencv-3.4\3rdparty\quirc\src\decode.c 409 1 quirc
Error 50 error C2054: expected '(' to follow 'inline' C:\opencv-3.4\3rdparty\quirc\src\decode.c 615 1 quirc
Error 2 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 22 1 quirc
Error 4 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 39 1 quirc
Error 5 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 49 1 quirc
Error 6 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 59 1 quirc
Error 7 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 69 1 quirc
Error 8 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 79 1 quirc
Error 9 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 89 1 quirc
Error 10 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 99 1 quirc
Error 11 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 109 1 quirc
Error 12 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 119 1 quirc
Error 13 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 129 1 quirc
Error 14 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 139 1 quirc
Error 15 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 149 1 quirc
Error 16 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 159 1 quirc
Error 17 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 169 1 quirc
Error 18 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 179 1 quirc
Error 19 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 189 1 quirc
Error 20 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 199 1 quirc
Error 21 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 209 1 quirc
Error 22 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 219 1 quirc
Error 23 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 229 1 quirc
Error 24 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 239 1 quirc
Error 25 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 249 1 quirc
Error 26 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 259 1 quirc
Error 27 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 269 1 quirc
Error 28 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 279 1 quirc
Error 29 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 289 1 quirc
Error 30 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 299 1 quirc
Error 31 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 309 1 quirc
Error 32 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 319 1 quirc
Error 33 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 329 1 quirc
Error 34 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 339 1 quirc
Error 35 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 349 1 quirc
Error 36 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 359 1 quirc
Error 37 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 369 1 quirc
Error 38 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 379 1 quirc
Error 39 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 389 1 quirc
Error 40 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 399 1 quirc
Error 41 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 409 1 quirc
Error 42 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 419 1 quirc
Error 1 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 21 1 quirc
Error 44 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\decode.c 45 1 quirc
Error 45 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\decode.c 121 1 quirc
Error 67 error C2059: syntax error : '[' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 124 1 quirc
Error 3 error C2059: syntax error : '}' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 29 1 quirc
Error 43 error C2059: syntax error : '}' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 430 1 quirc
Error 407 error C2065: 'HUGE_VALF' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\apriltag_quad_thresh.cpp 390 1 opencv_aruco
Error 408 error C2065: 'HUGE_VALF' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\apriltag_quad_thresh.cpp 445 1 opencv_aruco
Error 405 error C2065: 'INFINITY' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\zmaxheap.cpp 177 1 opencv_aruco
Error 406 error C2065: 'INFINITY' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\zmaxheap.cpp 178 1 opencv_aruco
Error 62 error C2065: 'min' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 65 error C2065: 'min' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 82 1 quirc
Error 59 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 64 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 66 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 86 1 quirc
Error 56 error C2065: 'olddim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 63 error C2065: 'olddim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 51 error C2085: 'bits_remaining' : not in formal parameter list C:\opencv-3.4\3rdparty\quirc\src\decode.c 616 1 quirc
Error 47 error C2085: 'grid_bit' : not in formal parameter list C:\opencv-3.4\3rdparty\quirc\src\decode.c 410 1 quirc
Error 48 error C2143: syntax error : missing ';' before '{' C:\opencv-3.4\3rdparty\quirc\src\decode.c 410 1 quirc
Error 52 error C2143: syntax error : missing ';' before '{' C:\opencv-3.4\3rdparty\quirc\src\decode.c 616 1 quirc
Error 61 error C2146: syntax error : missing ';' before identifier 'min' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 58 error C2146: syntax error : missing ';' before identifier 'newdim' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 55 error C2146: syntax error : missing ';' before identifier 'olddim' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 54 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 57 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 60 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 200 error C2784: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : could not deduce template argument for 'const std::vector<_Tp> &' from 'const std::vector<_Ty>' C:\opencv-3.4\modules\dnn\src\nms.cpp 31 1 opencv_dnn
Error 202 error C2784: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : could not deduce template argument for 'const std::vector<_Tp> &' from 'const std::vector<_Ty>' C:\opencv-3.4\modules\dnn\src\nms.cpp 40 1 opencv_dnn
Error 199 error C2896: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : cannot use function template 'float cv::dnn::experimental_dnn_34_v9::rectOverlap(const T &,const T &)' as a function argument C:\opencv-3.4\modules\dnn\src\nms.cpp 31 1 opencv_dnn
Error 201 error C2896: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : cannot use function template 'float cv::dnn::experimental_dnn_34_v9::rectOverlap(const T &,const T &)' as a function argument C:\opencv-3.4\modules\dnn\src\nms.cpp 40 1 opencv_dnn
Error 439 error C3861: 'acosh': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 163 1 opencv_tracking
Error 440 error C3861: 'acosh': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 173 1 opencv_tracking
Error 438 error C3861: 'isfinite': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 150 1 opencv_tracking
Error 458 error LNK1104: cannot open file '..\..\..\..\lib\Debug\opencv_xobjdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\xobjdetect\tools\waldboost_detector\LINK opencv_waldboost_detector
Error 370 error LNK1104: cannot open file '..\..\3rdparty\lib\Debug\quircd.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_objdetect
Error 442 error LNK1104: cannot open file '..\..\lib\Debug\opencv_aruco343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\aruco\LINK opencv_test_aruco
Error 460 error LNK1104: cannot open file '..\..\lib\Debug\opencv_aruco343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\interactive-calibration\LINK opencv_interactive-calibration
Error 223 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn_objdetect\LINK opencv_dnn_objdetect
Error 244 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\text\LINK opencv_text
Error 396 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn\LINK opencv_perf_dnn
Error 443 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn\LINK opencv_test_dnn
Error 444 error LNK1104: cannot open file '..\..\lib\Debug\opencv_face343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\face\LINK opencv_test_face
Error 409 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\face\LINK opencv_face
Error 431 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\xobjdetect\LINK opencv_xobjdetect
Error 436 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_perf_objdetect
Error 445 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_test_objdetect
Error 448 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\traincascade\LINK opencv_traincascade
Error 453 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\createsamples\LINK opencv_createsamples
Error 459 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dpm\LINK opencv_dpm
Error 361 error LNK1104: cannot open file '..\..\lib\Debug\opencv_text343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\datasets\LINK opencv_datasets
Error 446 error LNK1104: cannot open file '..\..\lib\Debug\opencv_text343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\text\LINK opencv_test_text
Error 441 error LNK1104: cannot open file '..\..\lib\Debug\opencv_tracking343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\tracking\LINK opencv_perf_tracking
Error 447 error LNK1104: cannot open file '..\..\lib\Debug\opencv_tracking343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\tracking\LINK opencv_test_tracking
Error 461 error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134 5 INSTALL
先谢谢您。
答案 0 :(得分:0)
我使用以前的版本(3.4.0)超过了错误 保留:永远不要使用最新版本。