一、libcurl库简介
libcurl是一个跨平台的网络协议库,支持http, https, ftp, gopher, telnet, dict, file, 和ldap 协议。libcurl同样支持HTTPS证书授权,HTTP POST, HTTP PUT, FTP 上传, HTTP基本表单上传,代理,cookies,和用户认证。
二、下载
库下载https://github.com/curl/curl/releases/tag/curl-7_71_1
三、解压
tar xvf curl-7.71.1\ \(1\).tar.bz2
解压完成生成一个文件夹curl-7.71.1
四、查看(只是单纯安装libcurl的同学可以直接跳到第七步)
五、查看README(自述文件)
大致分为6部分:README(自述文件)、CONTACT(联系方式)、WEB SITE(网站)、GIT(git下载)、SECURITY PROBLEMS(安全问题)、NOTICE(注意)
README
Curl is a command line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document.
libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl.3 man page to learn how!
You find answers to the most frequent questions we get in the FAQ document.
Study the COPYING file for distribution terms and similar. If you distribute curl binaries or other binaries that involve libcurl, you might enjoy the LICENSE-MIXING document.
All of those documents and more can be found in the docs/ directory.
CONTACT
If you have problems, questions, ideas or suggestions, please contact us by posting to a suitable mailing list. See https://curl.haxx.se/mail/
All contributors to the project are listed in the THANKS document.
WEB SITE
Visit the curl web site for the latest news and downloads:
https://curl.haxx.se/
GIT
To download the very latest source off the GIT server do this:
git clone https://github.com/curl/curl.git
(you’ll get a directory named curl created, filled with the source code)
SECURITY PROBLEMS
Report suspected security problems via our HackerOne page and not in public!
https://hackerone.com/curl
NOTICE
Curl contains pieces of source code that is Copyright © 1998, 1999Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.
六、查看docs(说明文件)(API的使用手册、安装说明)
6.1查看在README里提到的,docs文件夹下的curl.1
(API的使用手册)
6.2查看docs文件夹下的INSTALL
(安装说明)
6.3查看docs文件夹下的INSTALL.md
(安装说明)
有多种安装方式,如下:
我们找到Unix的安装方法:
七、linux具体安装过程
7.1 第一步、配置安装位置
./configure --prefix=$PWD/_install
加–host表示使用交叉编译工具
./configure --prefix=$PWD/_install --host=arm-linux...
安装到当前目录的_install文件夹(没有该文件,则会新建)
7.2 第二步
make
7.3 第三步
make install
安装完成后找到_install
文件
.h文件在_install文件夹下的include中,如下图:
库文件在_install文件夹下的lib中,如下图:
八、使用
找到第七步include和lib的路径即可
总结一下
使用第三方开源压缩包的流程: