一、LibCurl简介
LibCurl是免费的客户端URL传输库,支持FTP,FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE ,LDAP等协议,其主页是http://curl.haxx.se/。Libcurl具备线程安全、IpV6兼容、易于使用的特点。curl也是Linux下一个非常著名的下载库,通过这个库,可以很简单的实现文件的下载等操作。
这个库的接口直接输入url的链接就可以获取网络上的数据了。
比如输入http://www.xxxx.com/test.mp3
就可以拉这个MP3的文件数据下来了。
二、源码下载:
https://curl.haxx.se/download.html
我这里下的是.tar.gz的,用tar -xzvf 命令解压就可以了
三、交叉编译环境设置
3.1开源软件移植技巧:
1.configure文件
./configure是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本
./configure –help查看其他可选参数。
可以查看需要的功能
./configure –prefix=./out/curl –disable-shared –enable-static –without-libidn –without-ssl –without-librtmp –without-gnutls –without-nss –without-libssh2 –without-zlib –without-winidn –disable-rtsp –disable-ldap –disable-ldaps CC=arm-hisiv500-linux-gcc
CC= 可以指定编译器
3.2执行以下命令设置当前编译项:
./configure --prefix= --disable-shared --enable-static --enable-http --enable-ftp --enable-file --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-proxy --disable-ntlm-wb --disable-sspi --without-libidn --without-ssl --wit