1.将zbar源码移植到linux arm or mips架构设备上。(君正平台)

2.打开摄像头并运行zbar算法进行二维码识别。

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

解压后执行:

./configure --prefix=$(pwd)/ISVP_lib --enable-shared --enable-static --without-imagemagick --without-jpeg --without-python --without-gtk --without-qt --disable-video --host=mips-linux-uclibc CC=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-gcc CXX=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-g++ --with-pic=noCFLAGS="-O3 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections"

make && make install

报错如下:

./libtool:行61: -ffunction-sections: 未找到命令

./configure --prefix=$(pwd)/ISVP_lib --enable-shared --enable-static --without-imagemagick --without-jpeg --without-python --without-gtk --without-qt --disable-video --host=mips-linux-uclibc CC=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-gcc CXX=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-g++ 

make && make install

报错如下:

增加 export NM=nm

然后再执行 如上操作 ,编译OK

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐