mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-27 10:12:16 +01:00
08c721dab2b6d33f11ecf5ed089841d1fc9d8d15 [MSVC] Copy build output to src/ automatically after build (nicolas.dorier) Pull request description: I got frustrated many time that I run functional tests on an outdated binary. This make sure that files are properly copied (and debuggable) for functional tests after a build. This PR add a `common.vcxproj` which can be used to extend the build steps. I can't move it in `common.init`, because build step customization must always come at the end of a project file. ACKs for top commit: sipsorcery: tACK 08c721dab2b6d33f11ecf5ed089841d1fc9d8d15. fanquake: ACK 08c721dab2b6d33f11ecf5ed089841d1fc9d8d15 Tree-SHA512: 7c033552a7bbbd3bb51a72d13bf4254e3b779c59ec93629c85f17745a1b17a8c1d6c87bb5e50eb5f4e5486e767929c0126e555b185608fd666aa39729b5068e1
Building Bitcoin Core with Visual Studio
Introduction
Solution and project files to build the Bitcoin Core applications (except Qt dependent ones) with Visual Studio 2017 can be found in the build_msvc directory.
Building with Visual Studio is an alternative to the Linux based cross-compiler build.
Dependencies
A number of open source libraries are required in order to be able to build Bitcoin.
Options for installing the dependencies in a Visual Studio compatible manner are:
- Use Microsoft's vcpkg to download the source packages and build locally. This is the recommended approach.
- Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files.
- Use nuget packages with the understanding that any binary files have been compiled by an untrusted third party.
The external dependencies required for the Visual Studio build are (see dependencies.md for more info):
- Berkeley DB
- OpenSSL
- Boost
- libevent
- ZeroMQ
- RapidCheck
Additional dependencies required from the bitcoin-core GitHub repository are:
- libsecp256k1
- LevelDB
Building
The instructions below use vcpkg
to install the dependencies.
- Clone
vcpkg
from the github repository and install as per the instructions in the main README.md. - Install the required packages (replace x64 with x86 as required):
PS >.\vcpkg install --triplet x64-windows-static boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb rapidcheck
- Use Python to generate *.vcxproj from Makefile
PS >python msvc-autogen.py
- Build in Visual Studio.