Install the Boost library in Win7 and the Win7Boost Library

Source: Internet
Author: User

Install the Boost library in Win7 and the Win7Boost Library

The Boost library is a well-known C ++ class library recognized in the C ++ field and involves all aspects of programming. It records the installation process during use.

1. Download the boost Library

Official boost Library homepage: www.boost.org

2. Installation

Decompress the downloaded package to the specified directory.

3.create compilation tool bjam.exe

Run bootstrap.batin the source code directory to generate bjam.exe

4. Use bjam to compile the boost library in command line mode. Here, use the command line tool that comes with VS2012.

D: \ Program Files \ VS2012 \ VC> cd D: \ Program Files \ BoostSDK \ boost

D: \ Program Files \ BoostSDK \ boost> bjam stage

D: \ Program Files \ BoostSDK \ boost> bjam stage -- toolset = msvc-11.0 -- without-graph-
-Without-graph_parallel -- without-mpi -- without-wave -- stagedir = "D: \ Program File
S \ BoostSDK \ bin \ vc110 "link = static runtime-link = shared runtime-link = static thread
Ing = multi debug release

Note:

-- Toolset indicates the compilation tool, and the msvc-11.0 indicates Visual Studio 2012

-- Stagedir specifies the path for storing the compiled library files

-- Without-mpi indicates that the mpi library is not compiled. Other -- without is similar

Some libraries in the boost library must be compiled before they can be used. Most libraries only need to reference header files, and a few must be compiled into binary files.

Take note of the following official documents:

The first thing between people want to know is, "how do I build Boost ?" The good news is that often, there's nothing to build.

Nothing to Build?

Most Boost libraries areHeader-only: They consistEntirely of header filesContaining templates and inline functions, and require no separately-compiled library binaries or special treatment when linking.

The only Boost libraries thatMustBe built separately are:

  • Boost. Chrono
  • Boost. Context
  • Boost. Filesystem
  • Boost. GraphParallel
  • Boost. IOStreams
  • Boost. Locale
  • Boost. MPI
  • Boost. ProgramOptions
  • Boost. Python (see the Boost. Python build documentation before building and installing it)
  • Boost. Regex
  • Boost. Serialization
  • Boost. Signals
  • Boost. System
  • Boost. Thread
  • Boost. Timer
  • Boost. Wave

A few libraries have optional separately-compiled binaries:

  • Boost. DateTime has a binary component that is only needed if you're using itsTo_string/From_stringOr serialization features, or if you're targeting Visual C ++ 6.x or Borland.
  • Boost. Graph also has a binary component that is only needed if you intend to parse GraphViz files.
  • Boost. Math has binary components for the TR1 and C99 cmath functions.
  • Boost. Random has a binary component which is only needed if you're usingRandom_device.
  • Boost. Test can be used in "header-only" or "separately compiled" mode, althoughSeparate compilation is recommended for serious use.
  • Boost. exception provides non-intrusive implementation of prediction_ptr for 32-bit _ MSC_VER = 1310 and _ MSC_VER = 1400 which requires a separately-compiled binary. this is enabled by # define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.

5. quietly wait for the compilation of the database to be completed

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.