Visual Studio 2013 compile boost-1_56_0_b1

Source: Internet
Author: User


1, first download the source code package: http://www.boost.org/users/history/version_1_56_0.html is currently the latest version

2. decompress the package to the D: \ boost-1_56_0_b1 directory.

3, click D: \ boost-1_56_0_b1 directoryBootstrap. batBatch FileThe bjam.exe and project-config.jam files will be generated.

4. In the Start Menu, find Visual Studio 2013 --- Visual Studio Tools ---- vs2013. The developer prompts that the tool points to D: \ boost-1_56_0_b1 directory, for example (of course, install Visual Studio 2013 on your computer first)


5: Execute bjam stage -- without-Python -- toolset = msvc-12.0 -- Build-type = complete -- stagedir = "D: \ boost \ vc12" in this command line tool"

(It may take about two hours to compile. Of course, you can compile only the libraries you need and not compile them all)

The following describes the meaning of each parameter in detail:
Stage/install: stage indicates that only the library (DLL and Lib) is generated. Install also generates the include directory containing the header file.

Toolset: Specifies the compiler, optional such as Borland, GCC, msvc (vc6), msvc-12.0 (vs2013) and so on.

Without/with: select which libraries are not compiled/compiled.

Stagedir/Prefix: stagedir is used for stage, and prefix is used for install, which indicates the path of the compiled file. We recommend that you specify different directories for different ides. For example, vs2010 corresponds to D: \ boost \ vc12. Otherwise, all directories are generated under the same directory.

Build-Dir: the path of the intermediate file generated by compilation. Not used here

Link: generate a dynamic or static Link Library. To generate a dynamic link library, you must use the shared method. To generate a static link library, you must use the static method. Generally, the boost library may be compiled in static mode, because the DLL with boost will be cumbersome for the final release program.

Runtime-link: Dynamic/static link C/C ++ Runtime Library. There are also two methods: shared and static. In this way, runtime-link and link can generate four combination methods, and each user can choose to compile based on their own needs. Generally, if Link is set to static only, you only need to compile two combinations: link = static runtime-link = shared and link = static runtime-link = static.

Threading: Single/multi-thread compilation. Generally, multiple threads are written. Of course, the Multi method must be specified. If you need to write a single-threaded program, you also need to compile a single-threaded library. You can use the single method.

Debug/release: Compile the debug/release version. It is usually the debug version of the library corresponding to the debug version of the program, so both are compiled.

After running (input prompt pops up)

Appendix: All libraries to be compiled by boost


-Atomic
-Chrono
-Container
-Context
-Coroutine
-Date_time
-Exception
-Filesystem
-Graph
-Graph_parallel
-Iostreams
-Locale
-Log
-Math
-MPI
-Program_options
-Python
-Random
-RegEx
-Serialization
-Signals
-System
-Test
-Thread
-Timer
-Wave


Related Article

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.