Linux系统编程篇—开源压缩包的使用流程(libcurl库为例)

一、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的路径即可
在这里插入图片描述

总结一下

使用第三方开源压缩包的流程:
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值