1

我正在尝试从 Boost 中提取“正是我需要的”以减少签入足迹。到目前为止,我正在执行以下操作:

bootstrap.bat
b2 tools/bcp
md extract
dist\bin\bcp boost/thread.hpp boost/shared_ptr.hpp boost/enable_shared_from_this.hpp boost/asio.hpp boost/thread/thread.hpp boost/bind.hpp boost/thread/lock_types.hpp boost/thread/condition_variable.hpp .\extract
cd extract
..\b2

但这给了我一个错误:

boostcpp.jam: No such file or directory
link.jam: No such file or directory
Jamroot:137: in modules.load
ERROR: rule "boostcpp.set-version" unknown in module "Jamfile<C:\temp\boost_1_55_0\extract>".
C:/temp/boost_1_55_0/tools/build/v2/build\project.jam:311: in load-jamfile
C:/temp/boost_1_55_0/tools/build/v2/build\project.jam:64: in load
C:/temp/boost_1_55_0/tools/build/v2/build\project.jam:145: in project.find
C:/temp/boost_1_55_0/tools/build/v2\build-system.jam:535: in load
C:\temp\boost_1_55_0\tools\build\v2/kernel\modules.jam:289: in import
C:\temp\boost_1_55_0\tools\build\v2/kernel/bootstrap.jam:139: in boost-build
C:\temp\boost_1_55_0\boost-build.jam:17: in module scope

我究竟做错了什么?编译提取的子库的正确方法是什么?

4

2 回答 2

1

在引导并制作 bcp 后尝试此操作:

dist\bin\bcp boost/thread.hpp boost/shared_ptr.hpp boost/enable_shared_from_this.hpp boost/asio.hpp boost/thread/thread.hpp boost/bind.hpp boost/thread/lock_types.hpp boost/thread/condition_variable.hpp extract
dist\bin\bcp build chrono extract
cd extract
bootstrap.bat
b2

看到这个其他答案

于 2014-04-03T07:40:27.290 回答
0

将以下文件和目录复制到“提取”目录中。

copy b2.exe bjam.exe boost-build.jam boostcpp.jam project-config.jam .\extract
xcopy libs\config\checks .\extract\libs\config\ /E
xcopy tools .\extract\ /E

不要调用..\b2.exe,调用“解压”目录下的b2.exe。

cd .\extract
b2 -j8 toolset=msvc-10.0 address-model=32 architecture=x86 link=shared threading=multi runtime-link=shared --build-type=complete stage --stagedir=stage32_shared_vs2010
b2 -j8 toolset=msvc-10.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=static --build-type=complete stage --stagedir=stage32_static_vs2010
于 2017-11-03T06:34:53.800 回答