码迷,mamicode.com
首页 > Windows程序 > 详细

windows 下编译libcurl

时间:2019-10-26 18:47:22      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:程序   inux   nss   col   bss   ase   仓库   alt   hat   

因为linux平台采用了libcurl,有一个程序移植到到windows平台,再linux采用libcurl。在windows下准备也采用该库。在网上搜索了几位同行写的,步骤写的都不是太清楚,导致我走了不少弯路。

本文将以详细的步骤,介绍libcurl的编译。

 

下面是步骤:

 

1. 下载源代码,直接从github上clone仓库,就可以了。

     git clone https://github.com/curl/curl.git

2. 选择版本

    我采用了版本: 7.56.0 (tag)

3.  生成工程

    执行curl/projects文件下generate.bat,生成一个windows文件,文件夹下面有VS的工程,我选择的VS14。

 

    技术图片

  4.   打开curl-all.sln工程

  技术图片

 

 

5.  选择编译的项目:

   技术图片

 

 

6. 我们不需要OpenSSL 和 SSH2 两个库,我选择LIB Release执行,执行成功了。

    技术图片

 

7. 编译支持ssl的库,再projects中有一个ReadMe.txt,我们打开看一下。

The projects files also support build configurations that require third party dependencies such as OpenSSL, wolfSSL and SSH2. If you wish to support these, you will also need to download and compile those libraries as well.

如果需要支持他们,需要download这些特性呢,需要安装并且编译这些库。文件的目录结构如下:

技术图片

8.  我们接下来去github下载openssl 和 ssh2吧。注意,目录结构要和curl在同一个文件夹下面。(github的服务器在老外,估计有时候下载速度有点慢,如果碰到了很慢的情况,耐心等待一会。喝茶中....)

       git clone https://github.com/openssl/openssl.git

              git clone https://github.com/libssh2/libssh2.git

       

     

 

 

 

 

 

 

 

 

 

 

 

    

   

    

windows 下编译libcurl

标签:程序   inux   nss   col   bss   ase   仓库   alt   hat   

原文地址:https://www.cnblogs.com/damizhou/p/11744096.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!