• libcurl编译


    下载:

    git://github.com/bagder/curl.git

    openssl:

    openssl编译 

     
    for linux or mingw:
    ./buildconf
    ./configure --with-ssl="$PREFIX"
    make


    for android:
    ./buildconf
    ../configure  --prefix=$PREFIX
        CC=${CROSS_PREFIX}gcc
        --disable-shared
        --enable-static
        --with-ssl="$PREFIX"
        CFLAGS="-march=armv7-a -mfpu=neon --sysroot=${PLATFORM}"
        CPPFLAGS="-march=armv7-a -mfpu=neon --sysroot=${PLATFORM}"
        --host=arm-linux-androideabi

    make install
     
    for msvc:
    从开始菜单 -> visual studio 2013-> visual studio tools -> VS2013 x86 本机工具命令提示。进入vs编译环境。
    再进入curl源码根目录,执行下面命令:
    
    
    buildconf.bat
    cd winbuild
    nmake /f Makefile.vc mode=static VC=12
    
    
    生成的库位于源码根目录的 builds 下
    
    
    
    
     

    Usage: 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://pecl2.php.net/downloads/php-windows-builds/
    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_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_IPV6=<yes or no>      - Enable IPv6, defaults to yes
    ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes
    ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to ye
    s
    GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for rele
    ase build)
    DEBUG=<yes or no>            - Debug builds
    MACHINE=<x86 or x64>         - Target architecture (default x64 on AMD64, x86 on
     others)
    Makefile.vc(35) : fatal error U1050: please choose a valid mode
    Stop.
     
     
     
    使用 libcurl 库:
    编译时会生成一个工具 curl-config,用它可以得到编译需要的信息:
    $ ./curl-config --cflags
    -DCURL_STATICLIB -I/d/source/rabbitim/ThirdLibary/build_script/../windows_mingw/include
     
    $ ./curl-config --libs
    -L/d/source/rabbitim/ThirdLibary/build_script/../windows_mingw/lib -lcurl -lssl -lcrypto -lgdi32 -lwldap32 -lz -lws2_32
     
    http://blog.csdn.net/kl222/article/details/41898025
  • 相关阅读:
    操作系统 实验一 命令解释程序的编写
    软件工程 《构建之法》1、2、3章读后感
    软件工程实验一 复利计算 第四次实验
    软件工程实验一 复利计算(第三次实验实验总结)
    软件工程实验一 复利计算
    实验0 了解和熟悉操作系统
    团队工作总结及自评 & 补上来的用户调研
    四则运算安卓版ver.mk2
    安卓版四则运算
    每日更新
  • 原文地址:https://www.cnblogs.com/findumars/p/5087218.html
Copyright © 2020-2023  润新知