Build BitShares-Core with Visual Studio 2015

Environmental preparation

  • 64-bit Windows systems, such as Windows Server 2012 R2 Standard edition

  • Visual Studio 2015 with Update 1 (our test Completed successfully)

Setup Visual Studio 2015 with Update 1

*Known Issue: There is a problem compiling with VS 2015 Update 3

  • Download Visual Studio 2015 Update 1
Visual Studio Community 2015 with Update 1 (x86 and x64) - DVD (English)
SHA1: FB5AE6B57BDC495AFB29646AFCA088756363A263
  • Virtual Drive Software to Load the above iso Files

If you do not have a virtual drive software, you can use WinCDEmu;

  • Installing Visual Studio 2015 Update 1

  • Select C++ when installing

Download Software and Tools

  • Active perl

  • Download and install

If you do not have perl software in your machine, install it. You’ll need it later.:
  • NASM

  • Download and install NASM

If you do not install NASM, compiling OpenSSL will report errors that ml64 could not find (although there are other ways to resolve it, not described here).:
  • OpenSSL

BitShares Core depends on OpenSSL, and you must build this from source. This article uses 1.0.2u as an example.


Note: Although some of the above links provide compiled OpenSSL libraries for download, I encountered problems in the process of using them, and finally I solved them from the source code.

  • Download OpenSSL Source Code from;:
  • Extract (unzip) to the base directory C:\bts\.

  • the source code directory is C:\bts\openssl-1.0.2u (do not have multiple nested directories)

  • Boost

BitShares Core depends on the Boost libraries, only version 1.58 ~ 1.74. 1.58.0 is used here. ( 1.60 encountered a command line parameter parsing problem)

  • Download Boost Source Code from:

Note: The compiled library is also available for download on the Internet, but I have encountered problems in downloading and using it. Later, I solved it through my own compilation.

  • Extract (unzip) the source code to the base directory C:\bts\.

  • the source code directory is C:\bts\boost_1_58_0 (do not have multiple nested directories)

  • CMake

  • Download the CMake from;:
  • Extract (unzip) the source code to the base directory C:\bts\.

  • the source code directory is C:\bts\cmake-3.9.4-win64-x64 (do not have multiple nested directories)

Build the Library Dependencies

  • Build OpenSSL DLLs

  • Run VS2015 x64 Native Tools Command Prompt

Note: It is actually a shortcut, here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts. Content is:

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64
  • Execute the following command in the open command line interface

Please modify the actual directory according to the actual situation.:

set PATH=C:\Program Files\NASM;%PATH%

cd C:\bts\openssl-1.0.2u
perl Configure VC-WIN64A --prefix=C:\bts\openssl-1.0.2u-x64-release-static
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
  • After the compilation is completed, a C:\bts\openssl-1.0.2u-x64-release-static directory will be generated, which contains compiled library files.

Problems encountered and solutions:

  • If the problem of NASM cannot be found due to PATH, after adding PATH, you need to execute the nmake clean command to clear the temporary file generated before, or delete the source code and unzip it again.

Then start the compilation step from scratch, otherwise you will encounter the problem that the asm temporary file is empty.

  • Build Boost

  • Run VS2015 x64 Native Tools Command Prompt and execute the below commands:

    cd C:\bts\boost_1_58_0
    b2 architecture=x86 address-model=64 --build-type=complete --toolset=msvc-14.0 --threading=multi --variant=release release stage
  • Doxygen (optional)

Doxygen is not required. Its usefulness is to generate documentation and online help. For example, in cli_wallet, you can use the gethelp command to see the parameter description of the command.

  • Download Doxygen:
  • Extract it to C:\bts\ (do not have multiple nested directories)

  • Git

  • Download and install git:



  • Download and Install BitShares-Core Source code

Find and run Git Bash from the Start menu. In the open command line interface, execute the following command:

cd /c/bts
git clone
cd bitshares-core
git checkout <LATEST_RELEASE_TAG>
git submodule update --init --recursive


  • Please modify the specific directory according to the actual situation

  • Please replace <LATEST_RELEASE_TAG> by the latest release version of bitshares-core. If you need to compile other versions, modify accordingly. Find [BitShares Core latest release](

At the end of this, your base directory should look like this:

+- bitshares-core
+- boost_1_58_0
+- cmake-3.9.4-win64-x64
+- openssl-1.0.2u
+- openssl-1.0.2u-x64-release-static
+- (if you downloaded)

Set up the Environment for Build

  • Create a File C:\bts\setenv_x64.bat

  • Add the below lines and save it.:

    @echo off
    Set GRA_ROOT=C:\bts
    Set OPENSSL_ROOT=%GRA_ROOT%\openssl-1.0.2u-x64-release-static
    Set BOOST_ROOT=%GRA_ROOT%\boost_1_58_0
    Set CMAKE_ROOT=%GRA_ROOT%\cmake-3.9.4-win64-x64
  • Run VS2015 x64 Native Tools Command Prompt

  • Execute the below commands:

    cd C:\bts

The cmake interface will pop up.

  • CMake GUI

  • Set the values in the CMake GUI - Where is the source code: Enter or select bitshares-core source directory C:/bts/bitshares-core - Where to build the binaries: Enter or choose to compile the output directory, such as C:/bts/bin

  • Click the [Configure] button. - If prompted to compile the output directory does not exist, point [Yes] Create directory

  • In the popup box, - The first drop-down box Specify the generator for this project Select Visual Studio 14 2015 Win64 - The second input box Optional toolset to use (argument to -T) - The following radio box, select Use default native compiler - Click [Finish] and wait a moment, the Generate button will light up

  • Click [Generate] , and wait a moment, the Open Project button will light up

  • Click [Open Project] to open Visual Studio

Visual Studio

  • Build

  • Compile Bitshares-core - The default is Debug in the upper toolbar, modified to Release - another option mode is x64 by default and does not require modification

  • Build two executable - In the Solution Explorer on the right side of the interface, scroll down to find cli_wallet and witness_node. Right-click and select build.

After the compilation is complete, an executable file is generated:

* C:\bts\bin\programs\witness_node\Release\witness_node.exe
* C:\bts\bin\programs\cli_wallet\Release\cli_wallet.exe


Your next step…

  • The above-mentioned compiled witness_node.exe and cli_wallet.exe can be copied to other computers, but need to use both msvcp140.dll and vcruntime140.dll

    Copy to the same directory, under C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\. It can also be solved by static linking or by installing redistributable. This article does not elaborate.

  • Contributor: @abit

Note: This is a translation of the document contributed by Abit More. The original can be found here:


Also, referenced the below