1. 程式人生 > 其它 >【交叉編譯四】libzbar 二維碼識別庫

【交叉編譯四】libzbar 二維碼識別庫

技術標籤:開源liblibzbar移植

1.將zbar原始碼移植到linux arm or mips架構裝置上。(君正平臺)

2.開啟攝像頭並執行zbar演算法進行二維碼識別。

原始碼:wgethttp://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