This blog (http://blog.csdn.net/livelylittlefish) Post author (three two one @ fish) related research, learning content made notes, welcome to the majority of friends correct!
Boost library naming rules
For example:
Win32 platform
- Libboost_filesystem-vc80-mt-sgdp-1_40.lib
Linux platform
- Libboost_filesystem.so.1.40.0
Naming rules:
Prefix: Lib, but on the Win32 platform, only the static library has the Lib prefix.
Library name: name of the database starting with boost _. In this example, It is boost_filesystem.
Compiler identifier: Name and version of the compiler that compiles the library file. The example is-vc80.
Multi-threaded logo: If multithreading is supported,-MT is used. Otherwise, no multi-threaded logo appears.
Abi identifier: several compilation link options for the boost Library
S: static, static library ID
GD: Debug logo
P: Use stlpor instead of the STL provided by the compiler.
The example is the Library of static debug version using stlport.
Version: the boost version. For example, it is limit 40.
Extension: Win32 platform is. Lib, Linux platform is. A or. So
Two ways to link the boost Program
Specify the full path of the library file directly on the compile command line
Use-L to specify the path of the library file, and use-L to specify the library file name
VC compiler supports Automatic linking technology
Use the syntax "# pragma comment (Lib, XXX )"
Save the library lib file to the search path of VC, And the compiler will automatically find the appropriate library link to the executable file based on the Compilation options.
GCC does not support automatic link technology
On Linux, you only need to use the following command to install various dynamic and static libraries generated by boost to the corresponding directory to use boost.
#./Bjam install
Technorati label: boost