Many people (including me) met the infamous "undefined reference" error during installing OpenCV, such as
.. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Avpriv_vorbis_parse_extradata '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_des_init '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_rc4_crypt '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_aes_crypt '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_des_mac '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_tree_destroy '
. /.. /lib/libopencv_highgui.so.2.4.1:undefined reference to ' Av_sha_update '
collect2:ld returned 1 exit status
MAKE[2]: * * * [Bin/opencv_perf_imgproc] Error 1
make[1]: * * * [modules/imgproc/cmakefiles/opencv_perf_imgproc.dir/ ALL] Error 2 make
: * * * [ALL] Error 2
This error is caused by lacking of or improper installation of ffmpeg. If you are sure the FFmpeg are successfully installed, and you can find "–ffmpeg:yes" after CMake OpenCV, then you ' d Bett Er about adding option "--enable-shared" when Configure FFmpeg. After the re-installing ffmpeg, then this "undefined reference" error should disappear.
Ps:a very good guideline of installing OpenCV on Ubuntu:
A Comprehensive Guide to installing and configuring OpenCV on Ubuntu
Pps:damn Ubuntu!!!