编译地址
参考编译参数
libredwg的编译前置条件跟编译x264类似,可以看这个文章的一些配置
-
主要是配置ndk
-
ubuntu
修改配置参数
- 跟x264的配置参数确实有点区别,
- 没有--extra-cflags参数,需要配置CFLAGS全局变量
#!/bin/bash
API=21
export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang++
export CFLAGS="--target=aarch64-none-linux-android24 -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info"
#export LIBS="$TOOLCHAIN/sysroot"
echo $CC
echo $CXX
echo $CFLAGS
./configure --prefix=`pwd`/./out \
--host=aarch64-linux-android \
--enable-static=yes \
--enable-shared=no \
--with-pic=yes \
--with-sysroot=$TOOLCHAIN/sysroot
#--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
编译错误
dwgbmp.c:173:46: error: in call to 'fwrite', size * count is too large for the given buffer
retval = fwrite (&bmp_h.file_size, 4, 3, fh);
^
这个错误是生成program时的错误,android上用不到。可以先临时处理掉。