woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

在windows环境下编译libcurl库

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

 

 

posted on 2010-04-30 19:00 肥仔 阅读(4140) 评论(0)  编辑 收藏 引用 所属分类: 网络编程


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理