Skip to content

Boost

부스트 라이브러리는 프로그래머에게 검증된(또는 검증되고 있는) 가벼운 C++ 소스 라이브러리 이다.

이 라이브러리는 어플리케이션 개발에 있어 다방면에 광범위하고 유용하게 사용되는 것을 목표로 한다. 그리고 부스트는 표준 C++ 라이브러리(STL)과 매우 잘 동작하도록 설계되어 있다. 또한 부스트 라이브러리 사용에 대한 라이센스는 상업적이든 비상업적이든 무료로 사용할 수 있어 비용에 대한 부담이 없다.

간단한 설치방법

MinGW(or GCC)에서 설치하는 방법은 아래와 같다. (만약, MinGW에서 컴파일할 경우 ml.exe를 찾기 위하여 Visual Studio 명령 프롬프트로 콘솔창을 사용한다.)

bjam.exe --prefix=d:\down\boost toolset=gcc address-model=32 --build-type=complete install

참고로 아래는 b2를 사용하여 CentOS에 설치한 예제이다.

sudo ./b2 link=static,shared variant=release threading=multi install --prefix=/usr --without-python

아래는 layout을 사용한 예제이다. 참고로 -j8make의 그것과 동일하며, 멀티스레드를 사용한 빌드를 진행한다.

./b2 --prefix=$LOCAL_DIR --layout=system -j8 variant=release link=static install

Windows

Windows에서 빌드하는 방법은 Boost:WindowsBuildScript 항목 참조.

  • BOOST_ALL_DYN_LINK: Boost의 전체 라이브러리를 동적 링크 한다. 이 경우 사용하는 라이브러리를 Link해야 한다.
  • BOOST_ALL_NO_LIB: Boost의 전체 라이브러리를 정적 링크 한다.

Category

Build Options

--layout=<layout>
라이브러리 파일명 레이아웃을 선택한다. versioned, tagged, system가 있다.
참고자료는 아래의 주소와 같다.
http://www.boost.org/doc/libs/1_33_1/Jamfile
http://stackoverflow.com/questions/1768943/building-boost-on-linux-library-names
http://stackoverflow.com/questions/8940249/boost-how-bjam-constructs-a-library-name
덧붙여, system으로 컴파일 할 경우 variant, link와 같은 옵션은 여러 개 사용해선 안된다. 2

runtime-link는 사용하는 C-Runtime Library를 어떻게 연결할 것인지를 나타낸다. 그리고 link는 static(lib)또는 shared(dll)의 빌드결과 형태를 나타낸다.

참고로 위의 두 옵션이 다르면 아래와 같은 에러를 뿜으며 종료된다.

error: link=shared together with runtime-link=static is not allowed
error: such property combination is either impossible 
error: or too dangerious to be of any use

Library List

Boost Library List

Math and numerics

Data structures

Containers

Function objects and
higher-order programming

Miscellaneous

  • Accumulators
  • Geometry
  • Integer
  • Interval
  • Math
  • Mmath Common Factor
  • Math Octonion
  • Math Quaternion
  • Math/Special Functions
  • Math/Statistical Distributions
  • Multi-Array
  • Multiprecision
  • Numeric conversion
  • Odeint
  • Operators
  • Polygon
  • Random
  • Ratio
  • Rational
  • uBLAS
  • Any
  • Bitmap
  • Compressed Pair
  • Container
  • Fusion
  • Geometry
  • Heap
  • ICL
  • Multi-Index
  • Pointer Container
  • Polygon
  • Property Tree
  • Tuple
  • Uuid
  • Variant
  • Bind
  • Function
  • Functional
  • Functional/Factory
  • Functional/Forward
  • Functional/Hash
  • Functional/Overloaded Function
  • Lambda
  • Local Function
  • Member Function
  • Phoenix
  • Ref
  • Result Of
  • Signals
  • Signals2
  • Utility

Generic Programming

Template Metaprogramming

String and text processing

Concurrent Programming

Algorithms

  • Call Traits
  • Concept Check
  • Enable If
  • Function Types
  • GIL
  • In Place Factory
  • Operators
  • Property Map
  • Static Assert
  • TTI
  • Type Traits
  • Algorithm
  • Foreach
  • Geometry
  • GIL
  • Graph
  • Min-Max
  • Range
  • String Algo
  • Utility

Language Features Emulation

System

Domain Specific

Patterns and Idioms

Input/Output

  • Exception
  • Foreach
  • Move
  • Parameter
  • Scope Exit
  • Type Index
  • Typeof

Iterators

Correctness and testing

Memory

Programming Interfaces

State Machines

  • Function
  • Parameter
  • Meta State Machine
  • Statechart

Preprocessor Metaprogramming

Broken compiler workarounds

Parsing

Image processing

Inter-language support

  • GIL

ETC

Troubleshooting

boost::exception_detail::error_info_injector

프로그램 종료시 아래와 같은 에러메시지가 출력될 수 있다.

"boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >"

이 경우 try ... catch 블럭을 아래와 같이 사용하면 된다.

try {
    s.connect(*iterator);
} catch (boost::system::system_error const& e) {
    std::cout << "Warning: could not connect : " << e.what() << std::endl;
}

Local Download

Boost 1.60.0
Boost_1_60_0.7z

Favorite site

For Android

Tutorials

Boost build

Guide

References


  1. Viper-how_to_use_bjam.pdf 

  2. 파일 이름을 대표이름으로 하기 때문에 여러 개의 Library파일 이름이 중복된다. 같은 이유로 --build-type=complete도 주의 대상. 

  3. Boost_library_list-aronze_egloos_com.zip 

  4. Jacking75_cafe24_com-boost-ko.zip 

  5. Www.viper.pe.kr.zip (cgi-bin/moin.cgi/Boost.html 참조) 

  6. The_Boost_C++_Libraries.zip