交叉编译libcurl库遇到的 Unable to link function recv 错误解决办法

libcurl error: Unable to link function recv

最近在Android上交叉编译libcurl库, 遇到` Unable to link function recv `, 但是同样的脚本, 在同事电脑上跑的好好的, 尴尬...这种环境问题是最烦人的了....

搜了下, 找到如下sof, 说这个函数 `-lz , which is the flag to link the zlib`.

https://stackoverflow.com/questions/44343570/cross-compiling-libcurl-for-arm-linux-gnueabihf-unable-to-link-function-recv

 

忽然想到前两天编译android源码, 手动下载安装了zlib, 于是`./configure; make; make uninstall`卸载zlib, 在重新编译便ok了.

成功提示如下:

checking for recv... yes
checking types of args and return type for recv... int,void *,size_t,unsigned int,int

 

 

这里给两个排bug的小tip:

set -x 显示执行的bash命令.

出错后, 找到config.log, 查看详细错误信息.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值