Build and use boost under Windows 8.1 x64

Source: Internet
Author: User

1 compiling boost

Take 1.58.0 version Boost and VS2013 for example

Current decompression path "D:\Libraries\boost_1_58_0"

1) Open the VS2013 command prompt

2) Running Bootstrap.bat

Note Do not close the command prompt at all, all operations are completed in this

3) Run B2.exe or Bjam.exe

① View compilation options, enter "B2--help" at the command prompt

Please note the following compilation options

Properties:

Toolset=toolset
Indicate the toolset to build with.

Variant=debug|release
Select The Build variant

Link=static|shared
Whether to build static or shared libraries

Threading=single|multi
Whether to build single or multithreaded binaries

Runtime-link=static|shared
Whether to link to static or shared C and C + + runtime.

② compile, enter "B2 link=static threading=multi" at the command prompt

Note that the options here are to be compiled according to the needs of the project, if only to test the compilation process, without any parameters

2 using boost

Add boost in the Include and library in the project's property settings "VC + + Directories", such as configuration

3 precautions

1) Link not successful, xxx.lib not found

may be the result of inconsistencies in compilation options and boost compilation options,

Please follow the project compilation options to recompile boost or modify VS's configuration and match the configuration in boost.

2) Multiple compile boost, use B2 compile, can not do cleanup, can compile both debug and release version, multi-threaded and single-threaded version

Build and use boost under Windows 8.1 x64

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.