Hi!
I'm about to install OpenCV 2.4.1 on Ubuntu 12.04 LTS and during the build process some errors show up:
In file included from /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg.cpp:45:0: /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:845:10: error: use of enum ‘CodecID’ without previous declaration /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:845:52: error: invalid type in declaration before ‘;’ token /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:897:46: error: ‘CodecID’ has not been declared /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘AVStream* icv_add_video_stream_FFMPEG(AVFormatContext, int, int, int, int, double, int)’: /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:930:23: error: invalid conversion from ‘int’ to ‘AVCodecID’ [-fpermissive] In file included from /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg.cpp:45:0: /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvVideoWriter_FFMPEG::open(const char, int, double, int, int, bool)’: /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1276:5: error: ‘CodecID’ was not declared in this scope /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1276:13: error: expected ‘;’ before ‘codec_id’ /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1321:10: error: ‘codec_id’ was not declared in this scope /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1341:13: error: ‘codec_id’ was not declared in this scope /home/thomas/OpenCV-2.4.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1370:48: error: ‘codec_id’ was not declared in this scope make[2]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2
Anyone who have an idea about how to correct this or experienced the same errors? I have tried to see if there are some missed includes somewhere but can't find anything.
Thanks!
Regards Thomas