zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    FillForm网页表单填写插件(用于火狐浏览器,自动填表,自动表单,填写表单)
    Firefox下完整读写本地文件的方法
    failure notice
    百度奖品兑换监视程序
    javascript数组及其操作(zz)
    JMETER使用
    ubuntu安装mysql
    windows live writer写csdn博客,very good~
    用SSH在linux下安装JDK和Tomcat
    java模拟HTTP请求(集合了网上搜来的各种)
  • 原文地址:https://www.cnblogs.com/findumars/p/5087218.html
Copyright © 2011-2022 走看看