3
votes


I using Elementary OS and I'm trying to install OpenCV 3.1.0, I follow the instructions of http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/linux_install/linux_install.html
Also, I have installed libav 11.7 and ffmpeg 3.1.3
but, after cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. I get:
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'libgphoto2'
-- package 'libgphoto2' not found
And after make,
I get:
../../lib/libopencv_videoio.so.3.1.0: referencia a av_frame_alloc' sin definir <br> ../../lib/libopencv_videoio.so.3.1.0: referencia aav_frame_free' sin definir
collect2: error: ld returned 1 exit status
make[2]: * [bin/opencv_test_video] Error 1
make[1]: *
[modules/video/CMakeFiles/opencv_test_video.dir/all] Error 2

someone who can help me ?

1

1 Answers

1
votes

You can refer to this issue, which works for me. My problem is solved by set -DWITH_V4AL=OFF and -DWITH_LIBV4L=ON

After I set WITH_V4L = OFF but still keep WITH_LIBV4L = ON, the configuring skipped the searching of 'sys/videoio.h', and the compilation worked.