boost 库中一些库是需要编译的, 比如 filesystem
D:\Lib\boost_1_77_0>b2.exe --show-libraries
The following libraries require building:
- atomic
- chrono
- container
- context
- contract
- coroutine
- date_time
- exception
- fiber
- filesystem
- graph
- graph_parallel
- headers
- iostreams
- json
- locale
- log
- math
- mpi
- nowide
- program_options
- python
- random
- regex
- serialization
- stacktrace
- system
- test
- thread
- timer
- type_erasure
- wave
比如要编译 filesystem 库, 则使用选项 --with-filesystem, 但如果输错会提示.
D:\Lib\boost_1_77_0>b2.exe --with-filesystem -buildtype=complete install
Invalid option: -b
usage: b2.exe [ options ] targets...
-a Build all targets, even if they are current.
-dx Set the debug level to x (0-13,console,mi).
-fx Read x instead of bootstrap.
-jx Run up to x shell commands concurrently.
-lx Limit actions to x number of seconds after which they are stopped.
-mx Maximum target output saved (kb), default is to save all output.
-n Don't actually execute the updating actions.
-ox Mirror all output to file x.
-px x=0, pipes action stdout and stderr merged into action output.
-q Quit quickly as soon as a target fails.
-sx=y Set variable x=y, overriding environment.
-tx Rebuild x, even if it is up-to-date.
-v Print the version of jam and exit.
--x Option is ignored.
编译类型选项应该输入 --buildtype
D:\Lib\boost_1_77_0>b2.exe --with-filesystem -buildtype=complete install
D:\Lib\boost_1_77_0\boost\compatibility\cpp_c_headers\cwchar
已复制 1 个文件。
common.copy C:\Boost\include\boost-1_77\boost\compatibility\cpp_c_headers\ctime
D:\Lib\boost_1_77_0\boost\compatibility\cpp_c_headers\ctime
已复制 1 个文件。
common.copy C:\Boost\include\boost-1_77\boost\compatibility\cpp_c_headers\cwctype
D:\Lib\boost_1_77_0\boost\compatibility\cpp_c_headers\cwctype
已复制 1 个文件。
...updated 16179 targets...