移植 libqrencode(包含zlib、libpng)

前端之家收集整理的这篇文章主要介绍了移植 libqrencode(包含zlib、libpng)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1 . 系统环境:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

2 . 移植 zlib
由于libpng依赖于zlib,所以先得移植zlib
下载地址:http://www.zlib.net/

2.1 解压编译

  1. tar xzvf zlib-1.2.8.tar.gz
  2. cd zlib-1.2.8
  3. CC=arm-linux-gnueabi-gcc ./configure --prefix=/home/xiao/test/123/zlib
  4. make
  5. make install

3 . 移植 libpng
下载地址:http://www.libpng.org/pub/png/libpng.html

3.1 解压编译

  1. tar xJvf libpng-1.6.26.tar.xz
  2. cd libpng-1.6.26
  3. export CPPFLAGS="-I/home/xiao/test/123/zlib/include"
  4. export LDFLAGS="-L/home/xiao/test/123/zlib/lib"
  5. ./configure --host=arm-linux-gnueabi --prefix=/home/xiao/test/123/libpng
  6. make
  7. make install

4 . 移植 libqrencode
下载地址:http://fukuchi.org/works/qrencode/

4.1 解压编译

  1. tar xzvf qrencode-3.4.4.tar.gz
  2. cd qrencode-3.4.4
  3. export png_CFLAGS="-I/home/xiao/test/123/libpng/include/libpng16 -I/home/xiao/test/123/libpng/include -I/home/xiao/test/123/zlib/include"
  4. export png_LIBS="-L/home/xiao/test/123/libpng/lib -lpng16 -I/home/xiao/test/123/zlib -lz"
  5. ./configure --host=arm-linux-gnueabi --prefix=/home/xiao/test/123/qrencode
  6. make
  7. make install

参考网址:
http://www.jb51.cc/article/p-zlrntfvz-cx.html
http://www.jb51.cc/article/p-knbleffq-dt.html

猜你在找的Ubuntu相关文章