Hi,
Ubuntu12.04 comes with OpenCV2.3.1 by default.I tried compiling my project with default gcc version(4.6.3).
Following linking errors occur:
warning: libavcodec.so.52, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libavformat.so.52, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libavutil.so.50, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libswscale.so.0, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libopencv_highgui.so undefined reference to `url_fclose@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_open_input_file@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_register_all@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_free_packet@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_header@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_new_stream@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_guess_codec@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `url_fopen@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_close@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `guess_format@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_init_packet@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_find_decoder@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_malloc@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_encode_video@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_sub_q@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_scale@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_find_encoder@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_alloc_frame@LIBAVCODEC_52'|
/usr/local/lib/libopencv_highgui.so undefined reference to `av_rescale_q@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_find_stream_info@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_close_input_file@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_seek_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_trailer@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_getContext@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_freep@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_codec_get_id@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avpicture_get_size@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_set_parameters@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_read_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_free@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `dump_format@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_freeContext@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_alloc_format_context@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_decode_video@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_open@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avpicture_fill@LIBAVCODEC_52'
Is there any other way than 1.Downgrading Ubuntu to an earlier version
2.Upgrading to OpenCV2.4