Skip to content

Building on Windows

Tim Hughes edited this page Feb 25, 2014 · 13 revisions

Cross-compiling with MinGW64

Create fresh ubuntu 14.04 (Trusty Tahr) VM:

http://cdimage.ubuntu.com/daily-live/current/trusty-desktop-amd64.iso

See http://ubuntu.com for more details on installing Ubuntu.

Set up a crossbuild environment as described in Setting-up-prebuilt-crossbuild-environment, or for full instructions on how to set up the environment from scratch, Setting-up-crossbuild-environment-from-scratch.

Build cpp-ethereum:

$ git clone https://github.com/ethereum/cpp-ethereum
$ mkdir cpp-ethereum-build
$ cd cpp-ethereum-build
$ cmake ../cpp-ethereum -DTARGET_PLATFORM=w64
$ make
$ cd ..

Compiling with Visual Studio Express 2013

Ensure you have installed:

  • Visual Studio Express 2013. VS 2013 is a minimum as cpp-ethereum uses languages features not supported in 2012. The Professional edition should also work, but this has not been tested.
  • ActivePython.
  • Git for Windows 1.9.0+. This includes (among other things) git, sed, curl which are needed for bootstrap.sh, plus perl-5.8 which is needed to compile Qt. The Qt build instructions suggest that ActivePerl, ActivePython and Ruby are all required, however git perl and ActivePython appear to be sufficient.
  • 7-Zip.

Ensure 7z.exe and python.exe have been added to the PATH.

Execute the following commands within a Git Bash shell to download and compile Ethereum and all it's dependencies to the current directory:

$ curl -O https://raw.github.com/ethereum/cpp-ethereum/develop/windows/bootstrap.sh
$ ./bootstrap.sh

This will fetch about 300MB of sources and take up to about an hour to compile. It should then be possible to compile and debug by opening Ethereum.sln with Visual Studio 2013. Executing bootstrap.sh again should only be necessary if in future Ethereum requires additional libaries that weren't compiled in the previous run.

Clone this wiki locally