Curl的编译

libcurl开源的、跨平台的网络传输库,用于在程序中实现数据传输功能的编译 阅读详情

下载

curl的官网:https://curl.haxx.se/

libcurl就是一个库,curl就是使用libcurl实现的。

curl是一个exe,也可以说是整个项目的名字,而libcurl就是一个独立的库,所以做二次开发一般就使用库,当然为了简单也可以直接用curl.exe来完成。

curl只提供了源码的方式:https://curl.haxx.se/download.html,其他的方式都是第三方自己编译发布的。

curl下载安装的方式参考:https://curl.haxx.se/dlwiz/

curl executable - You will get a pre-built 'curl' binary from this link (or in some cases, by using the information that is provided at the page this link takes you). You may or may not get 'libcurl' installed as a shared library/DLL.
libcurl development - This is for libcurl development - but does not always contain libcurl itself. Most likely header files and documentation. If you intend to compile or build something that uses libcurl, this is most likely the package you want.
libcurl - This is a pure binary libcurl package, possibly including header files and documentation, but without the command line tool and other cruft. If you want libcurl for a program that uses libcurl, this is most likely the package you want.
source code - You will not download a pre-built binary from this link. You will instead get a link to site with the curl source, adjusted for your platform. You will need to have a compiler setup and working to be able to build curl from a source package.
Show All - Display all known package types.
这里的下载方式多数也是其他商家提供的,除了源码和可执行程序以外。

比如libcurl dev就没有windows平台的。

比如libcurl就是cygwin提供的,所以他的库也是用于cygwin的。

而sourcecode就可以下载平台独立的包,但是不是最新的。所以直接在https://curl.haxx.se/download.html页面下载即可。

下面就是主页下载的图片:

clipboard

我们就下载zip版本:

clipboard[1]

官方资料

https://curl.haxx.se/libcurl/c/

https://curl.haxx.se/libcurl/c/libcurl-tutorial.html

其他的HTTPClient

libcurl (MIT)

  • a highly portable and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunnelling and more!

libghttp (LGPL)

  • Having a glance at libghttp (a gnome http library), it looks as if it works rather similar to libcurl (for http). There's no web page for this and the person who's email is mentioned in the README of the latest release I found claims he has passed the leadership of the project to "eazel". Popular choice among GNOME projects.
libwww ( W3C license) comparison with libcurl
  • More complex and harder to use than libcurl is. Includes everything from multi-threading to HTML parsing. The most notable transfer-related feature that libcurl does not offer but libwww does, is caching.
libferit (GPL)
  • C++ library "for transferring files via http, ftp, gopher, proxy server". Based on 'snarf' 2.0.9-code (formerly known as libsnarf). Quote from freshmeat: "As the author of snarf, I have to say this frightens me. Snarf's networking system is far from robust and complete. It's probably full of bugs, and although it works for maybe 85% of all current situations, I wouldn't base a library on it."
neon (LGPL) comparison with neon
  • An HTTP and WebDAV client library, with a C interface. I've mainly heard and seen people use this with WebDAV as their main interest. This is one of the two alternatives used by the Subversion project.
libsoup (LGPL) comparison with libcurl
  • Part of glib (GNOME). Supports: HTTP 1.1, Persistent connections, Asynchronous DNS and transfers, Connection cache, Redirects, Basic, Digest, NTLM authentication, SSL with GnuTLS, Proxy support including SSL, POST data. Not portable. Lacks: cookie support, NTLM for proxies, GSS, gzip encoding, trailers in chunked responses, portability and more.
mozilla netlib (MPL)
  • Handles URLs, protocols, transports for the Mozilla browser.
mozilla libxpnet (MPL)
  • Minimal download library targeted to be much smaller than the above mentioned netlib. HTTP and FTP support.
wget (GPL)
  • While not a library at all, I've been told that people sometimes extract the network code from it and base their own hacks from there.
libfetch (BSD)
  • Does HTTP and FTP transfers (both ways), supports file: URLs, and an API for URL parsing. The utility fetchthat is built on libfetch is an integral part of the FreeBSD operating system.
HTTP Fetcher (LGPL)
  • " a small, robust, flexible library for downloading files via HTTP using the GET method."
http-tiny (Artistic License)
  • " a very small C library to make http queries (GET, HEAD, PUT, DELETE, etc.) easily portable and embeddable"
wininet comparison with libcurl
  • "The Windows Internet (WinINet) application programming interface (API) enables applications to interact with Gopher, FTP, and HTTP protocols to access Internet resources."
XMLHTTP Object also known as IXMLHTTPRequest (part of MSXML 3.0)
  • (Windows) Provides client-side protocol support for communication with HTTP servers. A client computer can use the XMLHTTP object to send an arbitrary HTTP request, receive the response, and have the Microsoft® XML Document Object Model (DOM) parse that response.
QHttp (GPL)
  • QHttp is a class in the Qt library from Troll Tech. Seems to be restricted to plain HTTP. Supports GET, POST and proxy. Asynchronous.
ftplib (GPL)
  • " a set of routines that implement the FTP protocol. They allow applications to create and access remote files through function calls instead of needing to fork and exec an interactive ftp client program."
    I stopped using it because it did not evolve and the maintainer did not even answer to my e-mailed patches and forum posts. The web site seems abandoned and the forum is not reachable anymore. It is simpler to use than libcurl, because it is not based on callbacks. But is is also much less powerful. / Patrick
ftplib++ (GPL)
  • A C++ library for "easy FTP client functionality. It features resuming of up- and downloads, FXP support, SSL/TLS encryption, and logging functionality."
GNU Common C++ library
  • Has a URLStream class. This C++ class allow you to download a file using HTTP. See demo/urlfetch.cpp in commoncpp2-1.3.19.tar.gz
HTTPClient (LGPL)
  • Java HTTP client library.
Jakarta Commons HttpClient (Apache License)
  • A Java HTTP client library written by the Jakarta project.
gnetlibrary (LGPL)
  • "a simple network library. It is written in C, object-oriented, and built upon GLib. It is intended to be easy to use and port". Features a HTTP component. It uses glib, and integrates very well within Gtk+ applications, which require event-driven programming.
Serf (Apache License)
  • "The serf library is a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It multiplexes connections, running the read/write communication asynchronously." This is one of the two alternatives used by the Subversion project.
qDecoder (BSD)
  • qDecoder is a development kit for C/C++ network programming includes simple HTTP client API.

 

 

编译

在curl的官方文档里面没有看到readme有讲解怎么使用,编译,安装等。但是肯目录结构也能猜出来...

就是在projects下面就有使用IDE编译的说明。还有一种编译方式,直接用命令的方式,参考:curl-7.50.1\winbuild

1.先用generate.bat生成项目文件

clipboard[6]

2.下载依赖库

下载的依赖库最好都应该放到同一个目录,跟curl是同一级的目录

1)    activeperl

        下载地址:http://www.activestate.com/activeperl/downloads

clipboard[7]

2)    openssl

“openssl/ssl.h”: No such file or directory

https://www.openssl.org/source/

clipboard[8]

        参考文件:INSTALL.W32

        1.配置:openssl-1.0.2h>perl Configure VC-WIN32 --prefix=E:\openssl (我们不需要汇编asm,所以不用这个方案)

perl Configure VC-WIN32 no-asm --prefix=E:/openssl/

        2.ms\do_nasm(我们不需要汇编asm,所以不用这个方案)

ms\do_ms

        3.换用vs的命令行工具,切换到根目录,然后,输入:nmake -f ms\ntdll.mak

clipboard[9]

clipboard[10]

错误:

cryptlib.obj : error LNK2001: 无法解析的外部符号 _OPENSSL_ia32cap_P

        cryptlib.obj : error LNK2019: 无法解析的外部符号 _OPENSSL_ia32_cpuid,该符号在函数 _OPENSSL_cpuid_setup 中被引用

        这个错误的原因是之前编译的临时文件没有清理的问题,因为我之前编译的时候没有添加no-asm选项,后面加上时没有清理就直接编译了,那肯定有问题。

        所以重新清理下再编译即可(清理方式就是重新解压一份原来的压缩包,重新来就是了)

        4.测试

nmake -f ms\ntdll.mak test

clipboard[11]

        5.安装

nmake -f ms\ntdll.mak install

clipboard[12]

            安装完成之后就是如下目录:

clipboard[13]

3)    Zlib

http://zlib.net/

http://zlib.net/zlib128.zip

clipboard[14]

        zlib需要用makefile(zlib128\zlib-1.2.8\win32)编译(或者用VS也可以:zlib128\zlib-1.2.8\contrib\vstudio\vc10)

        用makefile就需要启动VS的命令提示符来进行编译:

clipboard[15]

        切换到zlib目录,然后输入nmake -f win32/Makefile.msc

clipboard[16]

        下面是编译完成之后的截图:

clipboard[17]

4)    libssh2

        下载地址:https://www.libssh2.org/download/libssh2-1.7.0.tar.gz

        打开:libssh2-1.7.0\win32\libssh2.dsw

clipboard[18]

clipboard[19]

5)    pthread

        ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip

        这是一家编译好的版本,直接用就是了

3.使用VS编译Curl

在project下面,根据自己的VS版本类型,选择对应的目录进去即可。

clipboard[20]

1)    配置libcurl依赖库的头文件路径

clipboard[21]

2)    配置libcurl库的lib路径

clipboard[22]

3)    修改依赖的库

clipboard[23]

        由于我们的VS环境可能已经配置了其他的默认的一些库,所以这里编译就可能导致依赖的不相关的库找不到。

        于是我们就不从父级继承,而是直接把kernel32.lib和user32.lib添加上即可

4)    生成libcurl

clipboard[24]

5)    同样,修改curl的lib

clipboard[25]

6)    生成curl

clipboard[26]

clipboard[27]

头文件路径

curl-7.50.1\include

libcurl简介及其编程应用 阅读详情

相关推荐

把 ABAP 对象真正变成文件,SAP 这个 abap-file-formats 仓库到底在干嘛

SAP推出的abap-file-formats项目旨在为ABAP开发对象定义标准化的文件表示规范,解决ABAP代码难以融入现代开发流程的核心问题。该项目通过JSON Schema、类型定义和示例,为类、CDS、Behavior Definition等对象制定了human-readable的文件格式,支持UTF-8编码和Git友好设计。规范强调完整性、可读性和去元数据化,便于代码评审和工具链开发。虽然目前处于早期阶段,但为ABAP与Git、CI等现代工程实践集成提供了重要基础。项目采用工程化方法,包含自动生成

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 2153

curl之编译

文章目录一、编译前工作二、编译安装 一、编译前工作         进入下载页面:https://curl.se/download.html,下载.tar.gz包到指定目录。例如,下载curl-7.76.1.tar.gz并解压到/home/jaron/workspace/curl-7.76.1。         在父目录创建构建目录,例如:/home

hezhanran的博客 7246

交叉编译 CURL

交叉编译 curl

bluebird_shao的专栏 6013

windows curl命令详解

概述Curl命令可以通过命令行的方式,执行Http请求。在Elasticsearch中有使用的场景,因此这里研究下如何在windows下执行curl命令。软件下载下载地址:https://curl.haxx.se/download.html 使用方式一:在curl.exe目录中使用  解压下载后的压缩文件,通过cmd命令进入到curl.exe所在的目录。   由于博主使用的是windows 64

xiangzhihong8的专栏 2万+

相衬成像介绍

相衬成像介绍

qq_41981768的博客 2910

CTFshow-CRYPTO(持续更新)

密码学签到 }wohs.ftc{galf 将字符串逆序即可 letters = '}wohs.ftc{galf' a = list(letters) a.reverse() for letters in a: print(letters,end='') crypto2 打开浏览器的控制台,复制粘贴回车即可得到flag crypto3 这一题同上 crypto4 如图填写即可,一开始e填写的是17,一直回答错误,后来经过群内大佬提醒软件的e是十六进制的,17转十六进制就是0x11 cr

i_kei的博客 1万+

Windows下CURL编译 支持HTTPS

cURL是一个Linux下利用URL语法工作的文件传输工具,

Sakuya__的博客 8150

告别Quartus II的漫长等待:用VSCode+iverilog+GTKWave搭建你的轻量级Verilog仿真环境(2024保姆级教程)

本文详细介绍了如何利用VSCode、iverilog和GTKWave构建高效的Verilog/SystemVerilog开发环境,替代传统的Quartus II和ModelSim工具。通过2024年最新的保姆级教程,帮助开发者实现秒级启动、低资源消耗的轻量级仿真环境,显著提升数字电路设计的开发效率和调试体验。

weixin_33690963的博客 559

Windows下curl编译,使用vcpkg定制自己的【curl】。

本篇介绍在Windows下如何编译curl,curl自称是星球上最好用的计算机网络工具,但是它在windows上纯手动编译很困难,我们使用vcpkg来简化它的编译,方便我们使用。 curl可以用于各种与网络数据传输和管理相关的任务,跨平台性很高,号称地球上最好用网络传输工具。猜猜它为什么叫CURL?因为它全部由C语言构成,并且和URL相关,所以称之为CURL。

Bobowen的博客 2827

BES平台集成第三方音频算法避坑指南:以声加ENC为例,聊聊文件放置、内存分配与授权那些事

本文详细解析了在BES平台上集成声加ENC降噪算法的全流程,包括技术选型、系统架构设计、内存管理及量产授权等关键环节。特别针对BES平台的双核架构和内存限制,提供了文件放置、内存分配与授权验证的实用解决方案,帮助开发者高效实现音频算法集成。

weixin_33720956的博客 513

不同网段共享打印机的方法

不同网段怎么共享打印机,跨路由怎么共享打印机

weixin_44686104的博客 1万+

curl源码编译安装

https://curl.haxx.se/download.html 首先去curl官网下载对应版本,这里有个坑需要注意。如果下载的源码版本太高,编译是成功的,但是curl可执行文件访问https的时候还是会报各种奇怪的错误。所以我这里的做法是,先yuminstallcurl,然后curl -V看我的系统yum支持的curl最新版本。我这里是7.29.0 这里点击OldRelease...

Linux C/C++后台开发 2万+

Python爬虫实战:汽车之家车型参数与口碑数据抓取分析

在当今信息爆炸的时代,购车决策已从传统的4S店咨询转变为数据驱动的智能化过程。汽车之家作为国内领先的汽车信息平台,汇聚了海量车型参数、车主口碑和专业评测数据。本文将详细介绍如何使用Python最新爬虫技术构建一个高效、稳定的汽车数据采集系统,通过多维度数据分析辅助用户做出更明智的购车决策。本项目将采用异步爬虫、智能反爬绕过、数据清洗与分析等现代化技术栈,完整实现从数据采集到可视化分析的全流程。本文详细介绍了如何使用Python最新技术构建一个功能完整的汽车之家数据爬虫系统。

2201_76125261的博客 1488

cmake 编译curl源码_Windows下curl的编译

一、概述二、编译2.1 下载2.2 cmake配置2.3 配置工程三、部署3.1 手动部署3.2 自动搜索一、概述网络文件传输库,跟在线地图服务相关,是OpenSceneGraph的第三方依赖库。二、编译2.1 下载下载Curl-7.61.0并解压到D:\OSG\curl-7.61.0,在D:\OSG\curl-7.61.0文件夹下创建build目录。下载链接:https://curl....

weixin_39867708的博客 1916

RK3399平台开发系列讲解(内核入门篇)1.1、通过sysfs清楚了解设备的系统状况

文章目录1、不敢高声语,恐惊天上人:sysfs目的2、窥一斑而知全豹:sysfs目录介绍3、千丝万缕:sysfs中要素的关系4、数据观星:sysfs中相关结构体 1、不敢高声语,恐惊天上人:sysfs目的 我们想通过sys下面的目录和文件清楚的了解跑Liunx系统的嵌入式设备的系统状况。 2、窥一斑而知全豹:sysfs目录介绍 sysfs把连接在系统上的设备和总线组织成为一个分级的文件,它们可以由用户空间存取,向用户空间导出内核的数据结构以及它们的属性。sysfs的一个目的就是展示设备驱动模型中各组件.

内核笔记 1万+

超越防抖:索尼CXD5254GG芯片如何重新定义电子影像稳定

索尼CXD5254GG芯片通过融合6轴IMU与图像传感器数据,重新定义了电子影像稳定技术。其核心突破在于实时地平线校正、抑制果冻效应和镜头畸变校正,并搭载智能画质控制器提升画面细节。该芯片适用于广播制作、体育娱乐、安防监控和机器人视觉导航等专业领域,提供开箱即用的优化参数配置,大幅缩短开发周期。CXD5254GG不仅实现稳定成像,更通过姿态感知与智能优化,为专业影像应用提供了完整的稳定解决方案。

致力于lidar应用开发 113

curl编译以及arm交叉编译

虚拟机环境 ubuntu12.04 开发板 EasyARM-i.MX280A:   64m  sdram  128M  nandflash   运行官方提供的Linux-2.6.35.3内核linux 首先,如果需要使用curl解析https需要先编译openssl库,编译这个库可以参考 http://blog.youkuaiyun.com/andylauren/article/details/53

andylauren的专栏 1万+

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

WIN11下编译CURL

总的来说,libcurl 是一个功能强大、易于使用且稳定性高的网络传输库,适用于各种类型的应用程序,从简单的命令行工具到复杂的网络服务。我们验证一下编译好的libcurl是不是支持HTTPS,可以使用编译好的libcurl生成的可执行测试程序curl.exe测试。仍然需要打开vs2017的命令行工具,因为OPENSSL编译的是64位的,所以CURL也编译64位的,还是以管理员身份启动。编译好后会在解压的CURL目录下的生成一个builds目录,编译好的libcurl库就在里面。本人下载了7.88.0版本。

oqqWang1234567的专栏 1423

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

CURL编译

1>下载CURL源代码curl-7.26.0.zip  2>用VC2008/2005打开工程curl-7.26.0\lib\libcurl.vcproj,转换下工程并构建,可以直接编译成功! 3>新建个控制台工程测试下刚才编译的静态库libcurl.lib,可以在libcurl\curl-7.26.0\docs\examples目录找个简单的使用curl的例子,在这个工程选项Confi

zhuo_zhibin的专栏 7278

在Windows上通过NDK编译CURL

因为Windows不能像Linux那样执行configure命令,所以需要手动新建一个curl_config.h文件,该文件需要放入源码目录的lib文件夹下,具体内容如下: /* lib/curl_config.h. Generated from curl_config.h.in by configure. */ /* lib/curl_config.h.in. Generated from configure.ac by autoheader. */ /* when building libc

拥抱世界 825

curl 交叉编译

1、下载源码 2、解压 3、配置 CPPFLAGS="-I/usr/local/openssl/arm_openssl -I/usr/local/openssl/arm_openssl/include/" LDFLAGS="-L/usr/local/openssl/arm_openssl/lib" LIBS="-ldl" ./configure --host=arm-linux CC=arm-li...

怡宝的踩坑之路 5686

curl编译笔记

1 下载curl 版本为: 2 配置生成makefile CPPFLAGS="-I/home/qlz/opt/openssl/build-static/include" LDFLAGS="-L/home/qlz/opt/openssl/build-static/lib" LIBS="-ldl" ./configure --host=arm-himix200-linux CC=arm-himix200-linux-gcc CXX=arm-himix200-linux-g++ --with-ss

flying_ant2018的博客 1545

windows环境编译curl

背景 根据工作项目需求,在Qt程序中需要使用curl库来实现,记录下window环境的编译步骤。整体逻辑是比较清晰的,但有个别坑必须记录,纪念下,也希望帮到其他人!! 具体环境 目前使用的是Qt5.12.6,msvc2017-32位编译器,将编译成该环境下的静态库。考虑业务需求,这里没有使用OpenSSL。其它环境类比即可。 实现步骤 一、下载curl源码 直接使用命令下载,git clone https://github.com/curl/curl.git 。可能提示unable to access的错误

周小哥的博客 3123

curl和openssl交叉编译和curl命令使用

curl依赖openssl,所以需要先编译openssl: 编译openssl: 下载openssl:https://github.com/openssl/openssl/tree/OpenSSL_1_0_2r,下载解压。 参照:https://blog.youkuaiyun.com/ty3219/article/details/77717478 的方法一去编译,分别执行: ./Configure --pre...

yangyang031213的博客 1962
上一篇: 03_源码编译
下一篇: 自学-001-Qt下载安装-Ubuntu
WhyHowWhat
博客等级 码龄14年 2粉丝 25原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值