compile opencv2.3.1 in ubuntu 11.10

我与影子孤独终老i 提交于 2019-12-20 03:46:09

问题


Here is the tutorial I followed:http://thebitbangtheory.wordpress.com/2011/10/23/how-to-install-opencv-2-3-1-in-ubuntu-11-10-oneiric-ocelot-with-python-support/
I think the problem is ffmpeg, the version I used is 0.8.10, and I installed it in /usr and enabled share, but when I complied opencv,the output was full of

./../lib/libopencv_highgui.so.2.3.1: undefined reference to av_codec_get_id' ../../lib/libopencv_highgui.so.2.3.1: undefined reference toav_seek_frame'
../../lib/libopencv_highgui.so.2.3.1: undefined reference to `avpicture_get_size


回答1:


Check your LD_LIBRARY_PATH and PKG_CONFIG_PATH, along with the location you installed ffmpeg to.

See here for more information on the steps.




回答2:


Thanks to @karlphillip and @Appleman1234, and I solved my problem finally. The key is remove the /release directory that contains the cmake information and do the recompile from scratch, i.e. mkdir ./release, cd ./release, cmake, make and make install. BTW,ffmpeg is required 0.8+,and mine is 0.8.1.



来源:https://stackoverflow.com/questions/9307824/compile-opencv2-3-1-in-ubuntu-11-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!