Boost
lastmod 2022-01-13created 2014-01-0444 edits
The Boost libraries are lightweight C++ source libraries for programmers that have been vetted (or are being vetted).
The libraries aim to be broadly and usefully applicable across many areas of application development. Boost is also designed to work very well with the standard C++ library (STL). In addition, the Boost license lets you use the libraries for free, whether commercially or non-commercially, so there is no cost burden.
Quick installation
Installation with MinGW (or GCC) is as follows. (If compiling with MinGW, use the Visual Studio command prompt as the console window so that ml.exe can be found.)
For reference, below is an example of installing on CentOS with b2.
Below is an example using layout. Note that -j8 is the same as in make and builds with multiple threads.
Windows
See Boost:WindowsBuildScript for building on Windows.
Dynamic & Static link macro
-
BOOST_ALL_DYN_LINK: Dynamically links all Boost libraries. In this case, you must link the libraries you use. -
BOOST_ALL_NO_LIB: Statically links all Boost libraries.
Category
- Boost:Mingw-w64: Building Boost with MinGW-w64 (x64)
- Boost:CentOS: Installing Boost on CentOS.
Build Options
-
--layout=<layout> - Selects the library file name layout. The options are
versioned,tagged, andsystem. - References are at the following addresses.
system, options such as variant and link must not be given multiple values. 2 link vs runtime-link
runtime-link specifies how the C runtime library is linked. link specifies the form of the build output: static (lib) or shared (dll).
Note that if the two options above differ, the build exits with errors like the following.
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
The following error message may be printed when the program exits.
"boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >"
In this case, use a try ... catch block as follows.
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
- [Recommended] The Boost C++ Libraries
Boost build
- How to build boost 1.55 with MINGW?
- Undefined reference to InterlockedCompareExchange with boost.thread on mingw64 (but not on mingw32)
- Installing 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
-
Summary of the boost library list on boost.org -
[Recommended] Boost translation and list (links) - translation in progress... - Explanation of boost/checked_delete.hpp
- boost regexp
- boost locale
References
-
Viper-how_to_use_bjam.pdf ↩
-
Because the file name is used as the representative name, multiple library file names collide. For the same reason, be careful with
--build-type=completeas well. ↩ -
Boost_library_list-aronze_egloos_com.zip ↩
-
Jacking75_cafe24_com-boost-ko.zip ↩
-
Www.viper.pe.kr.zip (see cgi-bin/moin.cgi/Boost.html) ↩
-
The_Boost_C++_Libraries.zip ↩