编译之前先要安装几个依赖包:
安装依赖
sudo apt-get install debhelper
sudo apt-get install libsdl1.2-dev
sudo apt-get install libv4l-dev
sudo apt-get install pkg-config
把在网上下载的源码 luvcview_0.2.6.orig.tar.gz 到ubuntu与windows共享的文件夹中,解压缩:
tar vxf luvcview_0.2.6.orig.tar.gz
生产源码文件夹 luvcview-0.2.6,进入、清除一下:
cd luvcview-0.2.6
make clean
然后编译:
make
出错,错误比较多,有一个错误是
uvcvideo.h:5:10: fatal error: linux/videodev.h: No such file or directory
#include <linux/videodev.h>
查找资料可以通过ln -s (为某一个文件或目录在另外一个位置建立一个同步的链接,类似Windows下的超级链接)解决:
sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
make,还是出错,错误比较多: