MrMoDoJoJr
MrMoDoJoJr

Reputation: 410

Trying to extract sub library from Boost using bcp

I'm trying to extract "just what I need" from Boost to reduce the checkin footprint. So far I'm doing the following:

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

but this gives me an error:

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

What am I doing wrong? What is the correct way to compile the extracted sub-library?

Upvotes: 1

Views: 1561

Answers (2)

sailfish009
sailfish009

Reputation: 2927

copy following files and directory into "extract" directory.

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

Do not call ..\b2.exe, call b2.exe in "extract" directory.

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

Upvotes: 0

isomer
isomer

Reputation: 11

Try this after your bootstrap and making 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

See this other answer

Upvotes: 1

Related Questions