1、下载地址:https://sourceforge.net/projects/xlslib/
2、虚拟机:ubuntu14.04 LTS
3、解压压缩包xlslib-package-2.5.0.zip里面的xlslib文件夹到/opt目录下。
4、在/opt目录下创建文件夹xlslib-arm,
5、打开/opt/xlslib文件夹下的configure文件,找到几处有以下内容的地方
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
需要将这几处修改为
if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
保存
6、打开终端,输入以下命令
cd /opt/xlslib
./configure --host=arm-linux-gnueabihf --prefix=/opt/xlslib-arm/
make && make install
7、结束后会在/opt/xlslib-arm目录下include和lib两个文件夹,一个头文件,一个是库文件