Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
128 views
in Technique[技术] by (71.8m points)

c++ - boost_1_60_0 .zip installation in windows

I have performed below steps for windows 7

Boost link http://www.boost.org/doc/libs/1_49_0/libs/python/doc/

1. Downloaded boost_1_60_0 .zip

2. cd oost_1_60_0oolsuild

3. Ran below command in command prompt

bootstrap.bat gcc        
bjam --toolset=gcc "--prefix=C:DestinationFolder" install


Now i have b2.exe & bjam.exe in C:DestinationFolderin

Can anyone please help me in what to do next as I am unable to process further

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Since yours is now the third "How do I build boost on Windows?" question that I've seen since 1.60.0 was released here are my own personal Windows boost build notes:

Windows does not directly support boost, so you can download it and put it wherever you want.
The boost user guide recommends creating a BOOST_ROOT environment variable with the location of boost.

Note: in the following examples 2>&1 | tee ??_build.txt is optional, but it's useful to keep a build log...

Building for Visual Studio 2015

In a Visual Studio tools Command Prompt:

cd boost_1_xx_0
call bootstrap.bat

For static libraries:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=complete stage
2>&1 | tee msvc_static_build.txt

Note: thread must be built with dynamic linking see: https://studiofreya.com/2015/05/20/the-simplest-way-of-building-boost-1-58-for-32-bit-and-64-bit-architectures-with-visual-studio/

For dynamic thread library:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=shared threading=multi runtime-link=shared --with-thread --build-type=minimal stage
2>&1 | tee msvc_thread_build.txt

For all as dynamic libraries:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=shared threading=multi runtime-link=shared --build-type=complete stage
2>&1 | tee msvc_dynamic_build.txt

Building for MinGw

Ensure that gcc/mingw is in the path, e.g.: C:QtToolsmingw491_32in

cd boost_1_xx_0
bootstrap.bat mingw

b2 toolset=gcc link=shared threading=multi --build-type=complete stage
2>&1 | tee mingw_build.txt

Note: since boost 1.61.0 you may need to change: bootstrap.bat mingw to bootstrap.bat gcc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...