剑痴乎

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

VS2012命令行工具编译liburl

2014年9月20日 1275点热度 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 来减少垃圾评论。了解你的评论数据如何被处理。

相关文章
  • Google ProtoBuf协议介绍
  • Intel Media SDK 内存优化(转)
  • 网络字节转换到本地字节的函数模板
  • 解决Ubuntu下vlc无法播放文件
  • MFC WebBrowser控件如何实现滚动条滑动

COPYRIGHT © 2025 jianchihu.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang