【发布时间】:2011-12-07 15:55:54
【问题描述】:
我正在尝试构建启用 FFMPEG 的 OpenCV 2.3.0。由于 Ubuntu 11.10 仅提供版本 0.7 的 libavcodec/format,并且票证 #1020(下面的链接)表明它应该与 0.8 一起使用。
如果我尝试编译,我会收到以下错误:
[ 18%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o
In file included from /home/chris/src/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/foo/src/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:103:36: fatal error: libavformat/avformat.h: No such file or directory
compilation terminated.
此文件位于/opt/linux64-debug/include/ffmpeg/libavformat/avformat.h。我尝试用 CMAKE_INCLUDE_{DIRECTORY,PATH}、CMAKE_PREFIX_PATH 和 CMAKE_LIBRARY_PATH 指向 make。这些都不起作用。 (我一直使用路径/opt/linux64-debug/include/ffmpeg。)
【问题讨论】: