Got problem while building opencv accoding to link:

Determining if the include file linux/videodev.h exists failed with the following output:
Change Dir: /home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_affcb/fast"
/usr/bin/make -f CMakeFiles/cmTC_affcb.dir/build.make CMakeFiles/cmTC_affcb.dir/build
make[1]: Entering directory '/home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_affcb.dir/CheckIncludeFile.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden  -O3 -DNDEBUG   -o CMakeFiles/cmTC_affcb.dir/CheckIncludeFile.c.o   -c /home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/pi/opencv-3.1.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:28: fatal error: linux/videodev.h: No such file or directory
 #include <linux/videodev.h>
compilation terminated.

..... .....

I just did cd linux in order to look file videodev.h is there, but system can't find such directory. File /usr/include/linux/videodev.h exist on my system. I suppose compiler is not able to find it. How to solve such problem?


this would do:

sudo apt-get install libv4l-dev
sudo ln -s ../libv4l1-videodev.h videodev.h

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.