ubuntu16.04编译zbar1.0

  • 下载zbar1.0
    http://zbar.sourceforge.net/download.html
  • 安装依赖
    sudo apt-get install libqt4-dev
    sudo apt-get install libv4l-dev
  • 编译
cd zbar_directory
chmod 777 configure
export CFLAGS=""
./configure
make
  • 遇到错误
In file included from /usr/include/stdio.h:937:0,
                 from zbar/debug.h:60,
                 from zbar/scanner.c:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:140:1: error: expected identifier or ‘(’ before ‘{’ token

解决方法:


export CFLAGS="" //将CFLAGS环境变量置为空

你可能感兴趣的:(ubuntu16.04编译zbar1.0)