Home > Backend Development > C++ > How to Build Boost 1.60.0 on Windows?

How to Build Boost 1.60.0 on Windows?

Susan Sarandon
Release: 2024-11-04 07:38:02
Original
765 people have browsed it

How to Build Boost 1.60.0 on Windows?

How to Set Up boost_1_60_0 on Windows

For those looking to build boost on Windows, here are some step-by-step instructions:

Locate and Download boost

Download the boost_1_60_0 .zip file from the official Boost website.

Environmental Setup

Create a BOOST_ROOT environment variable pointing to the location of the extracted boost files.

Build Process

Visual Studio 2015

Open a Visual Studio tools Command Prompt and navigate to the boost_1_xx_0 directory. Run the following commands:

  • call bootstrap.bat
  • 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 (for static libraries)
  • 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 dynamic thread library)
  • 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 (for all libraries as dynamic)

MinGW

Ensure that gcc/mingw is added to your system path. In a command prompt, navigate to the boost_1_xx_0 directory and run the following commands:

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

Note: For Boost 1.61.0 and later, you may need to replace bootstrap.bat mingw with bootstrap.bat gcc.

The above is the detailed content of How to Build Boost 1.60.0 on Windows?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template