剑痴乎

  • 首页
  • 文章分类
    • 音视频
    • WebRTC
    • 编程之美
    • Linux
    • Windows
    • 生活点滴
    • 校园生活
  • 参考
    • API参考
    • 实用工具
    • 测试音视频
    • 文档
  • 留言板
  • 关于
剑痴乎
代码为剑,如痴如醉
  1. 首页
  2. 编程之美
  3. 正文

VS2012命令行工具编译liburl

2014年9月20日 1272点热度 0人点赞 0条评论

liburl是一个免费开源的,而且使用简单的网络库,支持DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet,TFTP协议。支持SSL认证, HTTP POST, HTTP PUT, FTP上传, 代理, cookies,文件传输恢复等等。而且支持多种操作系统,比如Windows,linux,Mac OS X等等。liburl使用很广泛,在很多软件里都可以看到liburl的身影(查看安装包里是否带有liburl的dll文件)。

官网已经提供了编译好的版本,今天我们需要用VS2012自带的Developer Command Prompt for VS2012工具编译liburl代码。
1)首先从http://curl.haxx.se/download/curl-7.38.0.zip下载代码包,放到本地某个目录解压;
2)打开VS2012的Developer Command Prompt for VS2012工具,cd到liburl的winbuild文件夹里,接下来我以静态编译为例子。然后敲入nmake /f Makefile.vc mode=static mode-vc11,回车,即可编译。如下图所示

liburl静态编译命令
编译中:
liburl编译中
3)最后我们可以在liburl的builds目录里找到编译后得到的文件。

liburl编译结果

如果我们要使用SSL,zlib功能,需要另外下载,可以到http://windows.php.net/downloads/php-sdk/deps/下载,如下是官方提供的编译时可能用到的一些命令:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
nmake /f Makefile.vc mode=<static or dll> <options>
 
where <options> is one or many of:
  VC=<6,7,8,9,10,11,12>        - VC versions
  WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)
                                 Defaults to sibbling directory deps: ../deps
                                 Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
                                 Uncompress them into the deps folder.
  WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static
  WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static
  WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static
  ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes
  ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes
  ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes
                                 Requires Windows Vista or later, or installation from:
                                 http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
  ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes
  GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)
  DEBUG=<yes or no>            - Debug builds
  MACHINE=<x86 or x64>         - Target architecture (default is x86)

本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2022年3月27日

Jeff

管理员——代码为剑,如痴如醉

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

版权声明

为支持原创,创作更好的文章,未经许可,禁止任何形式的转载与抄袭,如需转载请邮件私信!本人保留所有法定权利。违者必究!

最近评论
ztt 发布于 3 周前(04月05日) 你好,想看里面的视频和图片为什么没有显示呢?需要下flash吗还是什么。
huowa222 发布于 1 个月前(03月26日) 同问
邱国禄 发布于 2 个月前(02月17日) Receive Delta以0.25ms为单位,reference time以64ms为单位,kDe...
啊非 发布于 4 个月前(12月30日) 大神,请教一个问题: constexpr int kBaseScaleFactor = Tran...
啊非 发布于 4 个月前(12月30日) reference time:3字节,表示参考时间,以64ms为单位,但是 代码里面是 Trans...
相关文章
  • Google ProtoBuf协议介绍
  • Intel Media SDK 内存优化(转)
  • 网络字节转换到本地字节的函数模板
  • 解决Ubuntu下vlc无法播放文件
  • MFC WebBrowser控件如何实现滚动条滑动

COPYRIGHT © 2024 jianchihu.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang