Boost
부스트 라이브러리는 프로그래머에게 검증된(또는 검증되고 있는) 가벼운 C++ 소스 라이브러리 이다.
이 라이브러리는 어플리케이션 개발에 있어 다방면에 광범위하고 유용하게 사용되는 것을 목표로 한다. 그리고 부스트는 표준 C++ 라이브러리(STL)과 매우 잘 동작하도록 설계되어 있다. 또한 부스트 라이브러리 사용에 대한 라이센스는 상업적이든 비상업적이든 무료로 사용할 수 있어 비용에 대한 부담이 없다.
간단한 설치방법
MinGW(or GCC)에서 설치하는 방법은 아래와 같다. (만약, MinGW에서 컴파일할 경우 ml.exe를 찾기 위하여 Visual Studio 명령 프롬프트로 콘솔창을 사용한다.)
참고로 아래는 b2를 사용하여 CentOS에 설치한 예제이다.
아래는 layout을 사용한 예제이다. 참고로 -j8
은 make의 그것과 동일하며, 멀티스레드를 사용한 빌드를 진행한다.
Windows
Windows에서 빌드하는 방법은 Boost:WindowsBuildScript 항목 참조.
Dynamic & Static link macro
-
BOOST_ALL_DYN_LINK
: Boost의 전체 라이브러리를 동적 링크 한다. 이 경우 사용하는 라이브러리를 Link해야 한다. -
BOOST_ALL_NO_LIB
: Boost의 전체 라이브러리를 정적 링크 한다.
Category
- Boost:Mingw-w64: MinGW-w64(x64)로 Boost 빌드하기
- Boost:CentOS: CentOS에서 Boost 설치하기.
Build Options
-
--layout=
<layout> - 라이브러리 파일명 레이아웃을 선택한다.
versioned
,tagged
,system
가 있다. - 참고자료는 아래의 주소와 같다.
system
으로 컴파일 할 경우 variant
, link
와 같은 옵션은 여러 개 사용해선 안된다. 2 link vs runtime-link
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
|
|
|
|
|
|
|
| ||
|
|
| ||
| |
|
| |
|
|
|
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
- android NDK 编译BOOST
- compile boost 1.54 with android-ndk-r9(gcc-4.8)
- Cocos2dx: Compile and run boost libs on Android
- The Boost C++ Libraries 6
Tutorials
Boost build
- How to build boost 1.55 with MINGW?
- Undefined reference to InterlockedCompareExchange with boost.thread on mingw64 (but not on mingw32)
- Boost + Dev-Cpp (mingw) 설치법
- Using Boost Library in Eclipse CDT with Cygwin and MinGW
- Getting Started on Windows
- Binary installer for Boost on MinGW
Guide
-
boost.org 에 있는 boost library 목록 정리 -
[추천] Boost 번역과 목록(링크) - 번역 중... - boost/checked_delete.hpp에 대한 설명
- boost regexp
- boost locale