经过上次介绍Ubuntu 全新编译安装 OpenCV 2.3之后,很快,新的2.3.1又出来了,经不住诱惑,马上试试
但是,不知道大家在编译最新的2.3.1的时候出现错误没,反正我出现错误了,具体编译错误如下:
[ 35%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o
In file included from /home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::reopen()’:
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:486:5: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1050) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:486:52: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1050) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:494:5: warning: ‘int avcodec_thread_init(AVCodecContext*, int)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3611) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:494:50: warning: ‘int avcodec_thread_init(AVCodecContext*, int)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3611) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::open(const char*)’:
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:524:15: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1050) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:524:63: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1050) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:541:9: warning: ‘int avcodec_thread_init(AVCodecContext*, int)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3611) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:541:54: warning: ‘int avcodec_thread_init(AVCodecContext*, int)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3611) [-Wdeprecated-declarations]
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp:547:13: error: ‘CODEC_TYPE_VIDEO’ was not declared in this scope
/home/xizhibei/OpenCV2.3.1/release/CMakeExternals/Source/OpenCV/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::grabFrame()’:
/home/xizhibei/OpenCV2.3.1/release