Linux 下安装zbar
下载:zbar-0.10.tar.bz2
tar -xvf zbar-0.10.tar.bz2
cd zbar-0.10
vi zbar/qrcode/qrdectxt.c
int qr_code_data_list_extract_text(const qr_code_data_list *_qrlist,
zbar_image_scanner_t *iscn,
zbar_image_t *img)
{
..............
qrdata=_qrlist->qrdata;
nqrdata=_qrlist->nqrdata;
text=(char **)malloc(nqrdata*sizeof(*text));
mark=(unsigned char *)calloc(nqrdata,sizeof(*mark));
ntext=0;
/*This is the encoding the standard says is the default.*/
latin1_cd=iconv_open("UTF-8","GB18030");
/*But this one is often used, as well.*/
sjis_cd=iconv_open("UTF-8","SJIS");
/*This is a trivial conversion just to check validity without extra code.*/
utf8_cd=iconv_open("UTF-8","UTF-8");
for(i=0;i<nqrdata;i++)if(!mark[i]){
将里面的62行的换成 latin1_cd=iconv_open("UTF-8","GB18030");
保存退出
执行以下命令
sudo apt-get install python-gtk2-dev
sudo apt-get install libqt4-dev
./configure --enable-shared --without-jpeg --without-python --without-gtk --without-qt --without-imagemagick CPPFLAGS=""
make
sudo make install
更多推荐
所有评论(0)