linux下编译zbar64位,linux 编译zbar

linux下编译zbar64位,linux 编译zbar从github上git的源码的目录下没有configure,晕wgethttp://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.gztar-zvxfzbar-0.10.tar.gzexportCFLAGS=””./configureprefix=$(pwd)/output0808enable-s…

大家好,欢迎来到IT知识分享网。linux下编译zbar64位,linux 编译zbar

从github上git的源码的目录下没有configure ,晕

wget http://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.gz

tar -zvxf zbar-0.10.tar.gz

export CFLAGS=””./configure –prefix=$(pwd)/output0808 –enable-shared –enable-static –without-imagemagick –without-jpeg –without-python –without-gtk –without-qt –disable-video

make&&make intsall

在output0808/lib下

file libzbar.so.0.2.0

本节环境: linux deepin 15

在编译zbar之前,请看之前博客《Linux Imagemagick 安装》,zbar 测试依赖Imagemagick工具。

一、下载zbar源码

http://zbar.sourceforge.net/download.html

二、解压文件

eric@eric-PC:~/Documents/work/linux-c/zbar-0.10$ ls

aclocal.m4 config.log configure.ac eric-config.txt HACKING libtool Makefile.am perl python README TODO zbar-gtk.pc zbarimg zbar.pc.in

ChangeLog config.status COPYING examples include LICENSE Makefile.in plugin QRcode.png README.windows zbar zbar-gtk.pc.in zbar.nsi zbar-qt.pc

config configure doc gtk INSTALL Makefile NEWS pygtk qt test zbarcam zbar.ico zbar.pc zbar-qt.pc.in

1

2

3

4

5

三、配置zbar

eric@eric-PC:~/Documents/work/linux-c/zbar-0.10$ ./configure

1

完成后,提示错误

checking for linux/videodev.h… no

configure: error: in `/home/eric/Documents/work/linux-c/zbar-0.10′:

configure: error: test for video support failed!

rebuild your kernel to include video4linux support or

configure –disable-video to skip building video support.

See `config.log’ for more details.

类似错误,是因为相关依赖项,linux环境并未安装,但很多东西我们也并不需要,可以在配置的时候关闭相关模块./configure –enable-shared –enable-static –disable-video –without-gtk –without-qt –without-python

eric@eric-PC:~/Documents/work/linux-c/zbar-0.10$ ./configure –enable-shared –enable-static –disable-video –without-gtk –without-qt –without-python

checking whether build environment is sane… yes

checking for a thread-safe mkdir -p… /bin/mkdir -p

checking for gawk… gawk

checking whether make sets $(MAKE)… yes

checking build system type… x86_64-unknown-linux-gnu

checking host system type… x86_64-unknown-linux-gnu

checking for style of include used by make… GNU

please verify that the detected configuration matches your expectations:

————————————————————————

X –with-x=yes

pthreads –enable-pthread=yes

v4l –enable-video=no

=> zbarcam video scanner will *NOT* be built

jpeg –with-jpeg=yes

Magick++ –with-imagemagick=yes

Python –with-python=no

GTK+ –with-gtk=no

=> the GTK+ widget will *NOT* be built

Qt4 –with-qt=no

=> the Qt4 widget will *NOT* be built

eric@eric-PC:~/Documents/work/linux-c/zbar-0.10$

配置完成后,可以看到,Magick++、jpeg模块已经支持!

四、编译make,make install

编译完成后,可以看到生成的库文件

来源:oschina

链接:https://my.oschina.net/u/4361193/blog/4694956

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/11526.html

(0)
上一篇 2024-03-22 10:45
下一篇 2024-03-22 12:26

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信