Note: This is a work in progress. I am still diagnosing an issue that seems to be related to cmake/boost. I am posting this here to hopefully help others and someday find the time to fix my cmake/boost issue.
- 64-bit Windows operating system. These instructions were created with Windows 10 on an Intel PC.
- Visual Studio Community 2015 Update 1. Note: There seem to be problems compiling with Visual Studio versions above 2015 Update 1 (including VS2017).
- Perl. Active Perl was used for this document. It is assumed that it is in your PATH.
- CMake. Version 3.11 was used for this document. It is assumed that it is in your PATH.
- NASM is needed to compile OpenSSL. It is assumed that it is in your PATH.
- Git is needed to acquire the source code. It is assumed that it is in your PATH.
- Doxygen can be installed to build the documentation (this is not required). It is assumed that it is in your PATH.
- OpenSSL Version 1.0 works well, and was used to build this document. Some newer branches of bitshares-core support Version 1.1. Pre-compiled binaries do not seem to work, so the instructions to build this is included in this document.
- Boost Versions 1.57 and above, up to version 1.63. Pre-compiled binaries may work, but for this document, downloading and building version 1.63 from source is included.
- libCurl. A pre-compiled binary may work, but for this document, downloading and building the lastest version from source is included.
NOTE 1: For the purposes of this document, we will assume that we will place OpenSSL, Boost, and bitshares-core will be within the C:\Bitshares directory. It is also assumed you have opened a command prompt with the appropriate Visual Studio environment variables set (a.k.a. open the "VS2015 x64 Native Tools Command Prompt"), and are in the C:\Bitshares directory.
NOTE 2: As Visual Studio 2015 wants to install Update 3 automatically, you must run the installer with the command line: vs_community.exe /OverrideFeedURI https://download.microsoft.com/download/3/2/A/32A1974F-D236-43C1-8981-97DDCBAEF14A/20151201.1/enu/feed.xml See the following document for more details: https://msdn.microsoft.com/en-us/library/mt653628.aspx
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_0_2-stable
perl Configure VC-WIN64A
ms\do_win64a
nmake -f ms\ntdll.mak
md ..\openssl102
md ..\openssl102\bin
md ..\openssl102\lib
md ..\openssl102\include
md ..\openssl102\include\openssl
copy /b inc32\openssl\ ..\openssl102\include\openssl
copy /b out32dll\ssleay32.lib ..\openssl102\lib
copy /b out32dll\libeay32.lib ..\openssl102\lib
copy /b out32dll\ssleay32.dll ..\openssl102\bin
copy /b out32dll\libeay32.dll ..\openssl102\bin
copy /b out32dll\openssl.exe ..\openssl102\bin
cd ..
git clone https://github.com/boostorg/boost.git
cd boost
git checkout tags/boost-1.63.0
git submodule update --init --recursive
bootstrap
b2 install --prefix=C:\Bitshares\Boost163 link=static runtime-link=static architecture=x86 address-model=64 --build-type=complete --toolset=msvc-14.0 --threading=multi --variant=release release stage
cd ..
git clone https://github.com/curl/curl.git
cd curl
git checkout tags/curl-7_60_0
buildconf.bat
cd winbuild
nmake /f Makefile.vc mode=dll VC=14 MACHINE=x64
cd ..
That will put the necessary files in a directory such as C:\Bitshares\curl\builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl, which is not very convenient. So the following copies the files to a more convenient place.
md ..\curl760
md ..\curl760\bin
md ..\curl760\lib
md ..\curl760\include
md ..\curl760\include\curl
copy builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl\bin\* ..\curl760\bin
copy builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl\lib\* ..\curl760\lib
copy builds\libcurl-vc14-x64-release-dll-ipv6-sspi-winssl\include\curl\* ..\curl760\include\curl
cd ..
git clone https://github.com/bitshares/bitshares-core.git
cd bitshares-core
git submodule update --init --recursive
Thanks for the tutorial! Mostly anything worked. Just had some problems with the boost version. I switched to 1.57.0, that fixed all errors.