github地址:https://github.com/curl/curl.git
- 打开源码中curl/winbuild/MakefileBuild.vc文件
- 在下面三处末尾增加:/D_USING_V110_SDK71_
- 修改:CFLAGS = /I. /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL /D_USING_V110_SDK71_
- 修改:CFLAGS = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_USING_V110_SDK71_
- 修改:CURL_CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_USING_V110_SDK71_
- 打开VS2013开发人员命令提示工具,cd到curl/winbuild目录下运行如下命令:
- 编译debug版本:nmake /f Makefile.vc mode=static debug=yes vc=12
- 编译release版本:nmake /f Makefile.vc mode=static vc=12
- curl/builds目录下就可以看到生成的文件