CMake Error at cmake/OpenCVUtils.cmake:76 (if):
if given arguments:
"E:/C++" "MATCHES" "^E:/C++/Opencv 3.0/opencv/sources" "OR" "E:/C++" "MATCHES" "^E:/C++"
Regular expression "^E:/C++/Opencv 3.0/opencv/sources" cannot compile
Call Stack (most recent call first):
CMakeLists.txt:354 (ocv_include_directories)
Configuring incomplete, errors occurred!
See also "E:/C++/CMakeFiles/CMakeOutput.log".
這種情況為編譯的文件目錄中含有C++導(dǎo)致的,解決方法把文件目中++去掉
參考https://bbs.csdn.net/topics/390979188
Detected version of GNU GCC: 81 (801)
CMake Warning at cmake/OpenCVUtils.cmake:872 (message):
Download: Local copy of opencv_ffmpeg.dll has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
89c783eee1c47bfc733f08334ec2e31c)
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
Downloading opencv_ffmpeg.dll...
CMake Error at cmake/OpenCVUtils.cmake:895 (file):
file DOWNLOAD HASH mismatch
for file: [C:/CWockspase/opencv/opencv-3.1.0/3rdparty/ffmpeg/downloads/89c783eee1c47bfc733f08334ec2e31c/opencv_ffmpeg.dll]
expected hash: [89c783eee1c47bfc733f08334ec2e31c]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [6;"Couldn't resolve host name"]
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
CMake Error at cmake/OpenCVUtils.cmake:899 (message):
Failed to download opencv_ffmpeg.dll. Status=6;"Couldn't resolve host
name"
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
Configuring incomplete, errors occurred!
See also "C:/CWockspase/opencv/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "C:/CWockspase/opencv/opencv-3.1.0/build/CMakeFiles/CMakeError.log".
這種情況是需要下載的opencv_ffmpeg.dll這個文件下載失敗了稼病,下載失敗的原因是域名解析失斚髡帧:下載地址在x:\opencv\opencv-3.1.0\3rdparty\ffmpeg中的ffmpeg.cmake域名地址為raw.githubusercontent.com主要是這個域名被墻導(dǎo)致的
解決方法 域名被墻的方法 參考https://www.ioiox.com/archives/62.html