zoukankan      html  css  js  c++  java
  • to be or not to be this is a question

    sd 深度

    zd 纵度

    jxh 精细化

    gdzyx xddyh 高度专业化 相对多元化

    hd

    Software Collage: Installing the Boost Libraries 1.50 on Ubuntu 12.04 precise

    June 30, 2012

    Installing the Boost Libraries 1.50 on Ubuntu 12.04 precise

    The version 1.50 of the Boost Libraries has been released . Following are the instructions to install a private copy of the Boost Libraries, including ICU support, on Ubuntu 12.04 (precise).

    Setup

    I have chosen to download the source packages in ~/Software, and to install in ~/usr but you can also use any other directories.

    Make the required directories.


    mkdir ~/Software

    mkdir ~/Software/Boost

    mkdir ~/Software/ICU

    mkdir ~/usr

    Requirements

    Check the required packages.


    sudo apt-get install build-essential

    sudo apt-get install g++

    sudo apt-get install python-dev

    sudo apt-get install libzip-dev

    sudo apt-get install libbz2-dev

    Download and install the ICU Libraries

    We will install a private version of the ICU Libraries, I have chosen the ~/usr directory for the installation but can be any other.

    Download and decompress the ICU Libraries source package.


    cd ~/Software/ICU


    wget http://download.icu-project.org/files/icu4c/49.1.2/icu4c-49_1_2-src.tgz



    tar -xvf icu4c-49_1_2-src.tgz

    Configure, build and install the ICU Libraries.


    cd icu/source

    ./runConfigureICU Linux --prefix=${HOME}/usr --enable-static

    make

    make install

    Download the Boost Libraries

    Download and decompress the Boost Libraries source package.


    cd ~/Software/Boost


    wget -O boost_1_50_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download



    tar -xvf boost_1_50_0.tar.bz2

    Configure the Boost Libraries

    Declare the ICU_PATH environment variable.


    export ICU_PATH=${HOME}/usr

    Configure the Boost Libraries build system.


    cd boost_1_50_0

    ./bootstrap.sh

    Edit the generated project-config.jam file.


    gedit project-config.jam

    Make the required changes to the project-config.jam file. I have highlighted the required changes, note that you have to substitute the directory /home/your-user-name with your real home directory path.


    # Boost.Build Configuration

    # Automatically generated by bootstrap.sh



    import option ;

    import feature ;



    # Compiler configuration. This definition will be used unless

    # you already have defined some toolsets in your user-config.jam

    # file.

    if ! gcc in [ feature.values <toolset> ]

    {

    using gcc ;

    }



    project : default-build <toolset> gcc ;



    # Python configuration

    using python : 2.7 : /usr ;



    path-constant ICU_PATH : /home/your-user-name/usr ;



    # List of --with-<library> and --without-<library>

    # options. If left empty, all libraries will be built.

    # Options specified on the command line completely

    # override this variable.

    libraries = /home/your-user-name/usr ;



    # These settings are equivivalent to corresponding command-line

    # options.

    option.set prefix : /home/your-user-name/usr ;

    option.set exec-prefix : /home/your-user-name/usr ;

    option.set libdir : /home/your-user-name/usr/lib ;

    option.set includedir : /home/your-user-name/usr/include ;



    # Stop on first error

    option.set keep-going : false ;



    Save the file and exit the editor.

    Build and install Boost Libraries

    Build the Boost Libraries.


    ./b2

    Alternatively you can build the Boost Libraries enabling the C++11 compiler support.


    ./b2 toolset=gcc cxxflags=-std=c++0x

    The build process takes a while, once it is complete you can install the private version of the Boost Libraries.


    ./b2 install

  • 相关阅读:
    用 Flask 来写个轻博客 (31) — 使用 Flask-Admin 实现 FileSystem 管理
    jenkins持续集成:jenkins+SVN
    Linux基础一:Linux的安装及相关配置
    jenkins持续集成:构建多个job同时执行
    jenkins持续集成:定时构建语法
    Nginx详解二十九:基于Nginx的中间件架构设计
    Nginx详解二十八:Nginx架构篇Nginx+Lua的安全waf防火墙
    Nginx详解二十七:Nginx架构篇之安全篇
    Nginx详解二十六:Nginx架构篇之性能优化
    Nginx详解二十五:Nginx架构篇之Nginx常见的问题
  • 原文地址:https://www.cnblogs.com/lexus/p/2592670.html
Copyright © 2011-2022 走看看