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
  • 相关阅读:
    docker重启提示已存在一个容器的问题处理
    conda虚拟环境安装
    dell5460笔记本电脑ubuntu18.04系统音频驱动的安装和使用
    CentOS8的网络管理变化
    jupyter notebook 安装扩展nbextensions
    win10系统systeminfo命令的过滤用法
    《学习scrapy框架爬小说》的进一步完善
    记手机端 下拉加载新数据
    记 页面使用overflow-scroll在iOS上滑动卡顿的问题
    记 判断手机号运营商function
  • 原文地址:https://www.cnblogs.com/findumars/p/5087218.html
Copyright © 2011-2022 走看看