Published 31 October 2018

How to correctly assemble boost for CSNode build

CSNode module

CSNode module

CSNode is an executable node module written in C++ using the Boost library. The assembly is carried out using a cross-platform build system called CMake.

The article for building CSNode can be found here: https://github.com/CREDITSCOM/CS-Node

Motivation

Motivation

This article describes how to properly assemble a Boost library so that the CSNode build succeeds. An assembly on Windows 10 x64 is described.

Requirements

The following components must be installed:

  • Visual Studio 2017 (https://visualstudio.microsoft.com/ru/downloads/)
  • CMake (https://cmake.org/)

Boost

Boost

Boost is a collection of class libraries that use the functionality of the C++ language and provide a convenient cross-platform high-level interface for concise coding of various everyday programming subtasks (working with data, algorithms, files, streams, etc.). Freely distributed under the Boost Software License along with the source code.

Download and installation

Download and installation

There are several options for downloading the Boost library:

  • download of source codes and their subsequent assembly (https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.zip)
  • download of an already assembled library (no subsequent assembly is required) (https://sourceforge.net/projects/boost/files/boost-binaries/1.68.0/boost_1_68_0-bin-msvc-all-32-64.7z/download)

Both options are possible, but downloading the source code and assembling it is preferable, as it gives more control over the CSNode assembly.

Let's consider assembling a library from source code:

    • You must add the path to the library to the environment variable:

  • in c:\boost folder launch bootstrap.bat file
  • in c:\boost folder launch b2.exe file with the following parameters:

b2 toolset=msvc threading=single,multi --build-type=complete link=static

It may take some time to assemble the library.

Next, proceed to assembling CSNode, as it is written in the article:

https://github.com/CREDITSCOM/CS-Node

0 Useful article

Contents