安装zint
mkdir build
cd build
cmake …
make [-j nr_proc+1]
sudo make install
sudo ldconfig
静态库安装
vi backend/CMakeLists.txt
add_library(zint SHARED ${zint_SRCS}) 中
SHARED 改为:STATIC
安装libpng
./configure
make check
sudo make install
sudo ldconfig
交叉编译
png16
./configure CC=arm-oe-linux-gnueabi-gcc --prefix=$PWD/install --host=arm-oe-linux-gnueabi
make
make install
zint
vi backend/CMakeLists.txt
a、find_package(PNG)下面添加
set(CMAKE_C_COMPILER arm-oe-linux-gnueabi-gcc)
include_directories(/home/hslong/libpng-1.6.36/install/include) #libpng16的头文件
b、去掉两个if(PNG_FOUND)下面(防止连接系统的库)
#include_directories( ${PNG_INCLUDES} )
#target_link_libraries(zint ${PNG_LIBRARIES} )
c、target_link_libraries(zint -lm)上面添加
target_link_libraries(/home/hslong/libpng-1.6.36/install/lib/png16) #libpng16路径
d、add_library(zint SHARED ${zint_SRCS}) 中
SHARED 改为:STATIC
vi CMakeLists.txt(主目录)
a、去掉(只编译库)
#add_subdirectory(frontend)
点击下载:Zint和libpng库源码也可以从官网上下载