加载中…
正文 字体大小:

[原创]在windows环境下编译libcurl库

(2008-05-15 19:57:35)
标签:

vc

to

work

mds

visual

it

分类: 技术/开发(原创/转载)

Download Microsoft Platform SDK
========================================================
    http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
    Install it


Download Zlib Source
========================================================
    from http://www.zlib.net/
    http://www.zlib.net/zlib123.zip


Build Zlib
========================================================
    Use Visual C++ 6
    zlib123\projects\visualc6\zlib.dsw


Download Openssl Source
========================================================
    from http://www.openssl.org/source/
    http://www.openssl.org/source/openssl-0.9.8g.tar.gz


Build Openssl
========================================================
    maybe need to install active perl
    http://lccnc.skycn.com/down/ActivePerl-5.8.8.822-MSWin32-x86-280952.zip

    # run build shell
    cd openssl-***
    ms\32all.bat


Download Curl Source
========================================================
    from http://curl.haxx.se/
    http://curl.haxx.se/download/curl-7.18.1.zip


Build Curl
========================================================
    1. Pre Build
   
    a. create bat file for debug
    call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat"
    set CFG=debug-dll-ssl-dll-zlib-dll
    set OPENSSL_PATH=D:\svn_work\MDS\USS\trunk\openssl-0.9.8g
    set ZLIB_PATH=D:\svn_work\MDS\USS\trunk\zlib123-dll
    nmake -f Makefile.vc6

    b. create bat file for release
    call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat"
    set CFG=release-dll-ssl-dll-zlib-dll
    set OPENSSL_PATH=D:\svn_work\MDS\USS\trunk\openssl-0.9.8g
    set ZLIB_PATH=D:\svn_work\MDS\USS\trunk\zlib123
    nmake -f Makefile.vc6

    c. save shell code to bat file
    Save to : curl-***\lib\build.bat

    d. modify curl-***\lib\Makefile.vc6
    Find
        CFLAGS     = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
    set as
        CFLAGS     = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL  /I"C:\Program Files\Microsoft Platform SDK\Include"

    e. copy zlib123\projects\visualc6\Win32_DLL_Release\zlib1.lib to curl-7.18.1\lib\zdll.lib


    2. Build
    cd curl-***\lib
    build.bat
   

0

阅读 评论 收藏 转载 喜欢 打印举报
已投稿到:
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 不良信息反馈 电话:4006900000 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有