zoukankan      html  css  js  c++  java
  • boost1_55_0编译和安装

    1、在www.boost.org下载文件并解压

    2、进行解压目录

        2.1 编译前的配置工作

        执行bootstrap.bat  windows

        使用vs2010:

                  修改oost_1_55_0 oolsuildv2user-config.jam文件,

                 # Configure specific msvc version (searched for in standard locations and PATH).
                 # using msvc : 8.0 ;
                  using msvc : 10.0 ; //新增加的

        使用CodeBlocks自带的MinGW编译器:

               1、先把编译所在路径加入到环境变量中,如我本机为D:Program Files (x86)CodeBlocksMinGWin

               2、新打开cmd窗口,输入gcc -v查看gcc的版本。成功显示说明加入环境变量成功,可以进行编译。

               3、 修改oost_1_55_0 oolsuildv2user-config.jam文件,

                    # Configure gcc (default version).
                    using gcc ;    //去掉前面的#表示启用

        执行./bootstrap.sh  linux

         2.2 编译

         b2.exe --buildtype=complete stage windows

         ./b2 --buildtype=complete stage linux

         2.3  可以选择库进行编译

         b2 --show-libraries,可查看所有必须编译才能使用的库

         b2 --with-date_time --with-thread --buildtype=complete stage 只编译date_time 和thread库

    3、引用相头的库即可使用。按步骤2.3进行编译的话生成库存放位置在boost_1_55_0stagelib下面。

    install                 Install headers and compiled library files to the  configured locations (below).
    #
    #   --prefix=<PREFIX>       Install architecture independent files here.
    #                           Default; C:Boost on Win32
    #                           Default; /usr/local on Unix. Linux, etc.

    stage                   Build and install only compiled library files  to the stage directory.
    #
    #   --stagedir=<STAGEDIR>   Install library files here
    #                           Default; ./stage

        

  • 相关阅读:
    2019 ICPC Malaysia National H题
    欧拉定理证明
    P3384 【模板】树链剖分
    HDU 6070 Dirt Ratio(线段树、二分)
    51Nod 1571 最近等对(线段树、离线查询)
    51Nod 1781 Pinball(线段树、dp、离散化)
    51Nod 1494 选举拉票(权值线段树)
    51Nod 1766 树上的最远点对(欧拉序、lca、线段树区间合并)
    lintcode-179-更新二进制位
    lintcode-178-图是否是树
  • 原文地址:https://www.cnblogs.com/zxpo/p/3535554.html
Copyright © 2011-2022 走看看