当安装opencv2.3.0,重新编译(debug)install时,经常会碰到这个问题,一开始没有头绪,怎么调都调不出来。但是在仔细查看错误信息并结合网上内容,终于解决了。应该是由ffmpeg引起的,具体内容可以看下面前辈的分享。
步骤是:1.找到外层目录下的cmake_install.cmake文件
2.找到并用”#“注释掉
#IF(NOT CMAKE_INSTALL_COMPONENT OR "¥{CMAKE_INSTALL_COMPONENT}" STREQUAL "main")
# FILE(INSTALL DESTINATION "¥{CMAKE_INSTALL_PREFIX}/bin" TYPE FILE FILES "D:/Program
#Files/OpenCV-2.3.0/vs2008/bin/Debug/opencv_ffmpeg230d.dll")
#ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "¥{CMAKE_INSTALL_COMPONENT}" STREQUAL "main")
#IF(NOT CMAKE_INSTALL_COMPONENT OR "¥{CMAKE_INSTALL_COMPONENT}" STREQUAL "main")
# FILE(INSTALL DESTINATION "¥{CMAKE_INSTALL_PREFIX}/lib" TYPE FILE FILES "D:/Program
#Files/OpenCV-2.3.0/vs2008/lib/Debug/opencv_ffmpeg230d.lib")
#ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "¥{CMAKE_INSTALL_COMPONENT}" STREQUAL "main")
3.重新编译所有内容
详细请看:http://blog.csdn.net/lzq668/article/details/7016986和http://www.byywee.com/page/M0/S591/591361.html
另外补充一下,http://opencv.itseez.com/doc/user_guide/ug_highgui.html中关于支持openni的内容”Configure OpenCV with OpenNI support by setting texttt{WITH_OPENNI} flag in CMake“,我的理解就是在cmake中添加一个选项,搜索 with_openni,然后重新configure和generate,注意OPENNI_LIB_DIR的路径需要手动配置。具体项目可能还要再在include files和 lib文件中输入openni的路径。