<p>Take a look at <a href="https://bitcointalk.org/index.php?topic=5851.msg86700#msg86700" rel="nofollow noreferrer">Windows Build Instructions</a> By Matt Corallo, it's outdated, but has some additional comments to the <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/build-msw.txt" rel="nofollow noreferrer">included doc</a>.</p>

<blockquote>
  <p><strong>Install:</strong></p>
  
  <ul>
  <li>MinGW Automated Installer from<br>
  <a href="http://sourceforge.net/projects/mingw/files/OldFiles/mingw-get-inst/mingw-get-inst-20110316/" rel="nofollow noreferrer">http://sourceforge.net/projects/mingw/files/OldFiles/mingw-get-inst/mingw-get-inst-20110316/</a>.
  Install with the C++ and MSYS options checked.</li>
  <li>Activestate Perl (for building openssl) from<br>
  <a href="http://www.activestate.com/activeperl/downloads" rel="nofollow noreferrer">http://www.activestate.com/activeperl/downloads</a>.  You don't need<br>
  anything except ActivePerl and Perl, none of the other fancy crap.<br>
  You do want to add Perl to your PATH (its an option in the<br>
  installer).</li>
  </ul>
  
  <p><strong>Download:</strong></p>
  
  <ul>
  <li>WxWidgets 2.9.1:<br>
  <a href="http://sourceforge.net/projects/wxwindows/files/2.9.1/wxWidgets-2.9.1.zip/download" rel="nofollow noreferrer">http://sourceforge.net/projects/wxwindows/files/2.9.1/wxWidgets-2.9.1.zip/download</a>.
  Unzip to C:\wxWidgets-2.9.1-mgw</li>
  <li>OpenSSL 1.0.0d:
  <a href="http://www.openssl.org/source/openssl-1.0.0d.tar.gz" rel="nofollow noreferrer">http://www.openssl.org/source/openssl-1.0.0d.tar.gz</a>.     Untar  to
  C:\openssl-1.0.0c-mgw (yes bitcoin is designed to build with
  1.0.0c, but might as well use the latest version since it works right?) Hint: untar using the tar binary which is included in MinGW (do not use 7-zip, <a href="https://stackoverflow.com/questions/10102873/undefined-reference-to-winmain16-with-cygwin-and-mingw-in-openssl">it will not handle symlinks correctly</a>) using cd \c\ &amp;&amp; tar xvvf\c\Users\Matt\Downloads\openssl-1.0.0d.tar.gz &amp;&amp; mv openssl-1.0.0d openssl-1.0.0c-mgw in the msys shell</li>
  <li>Berkeley DB 4.7.25 NC: <a href="http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip" rel="nofollow noreferrer">http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip</a>.  Unzip to C:\db-4.7.25.NC-mgw</li>
  <li>Boost 1.43.0:<br>
  <a href="http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.zip/download" rel="nofollow noreferrer">http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.zip/download</a>. Unzip to C:\boost-1.43.0-mgw</li>
  <li><p>Boost Jam:<br>
  <a href="http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download" rel="nofollow noreferrer">http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download</a>. Unzip wherever you like, I used C:\bjam </p></li>
  <li><p>miniUPnPc binary<br>
  <a href="http://miniupnp.tuxfamily.org/files/download.php?file=upnpc-exe-win32-20110215.zip" rel="nofollow noreferrer">http://miniupnp.tuxfamily.org/files/download.php?file=upnpc-exe-win32-20110215.zip</a>.
  Unzip to C:\upnpc-exe-win32-20110215</p></li>
  <li><p>miniUPnPc source<br>
  <a href="http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.20110215.tar.gz" rel="nofollow noreferrer">http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.20110215.tar.gz</a>. Untar to C:\upnpc-exe-win32-20110215\miniupnpc (you only need *.h, but the others won't hurt) untar with cd \c\upnpc-exe-win32-20110215 &amp;&amp; tar xvvf \c\Users\Matt\Downloads\miniupnpc-1.5.20110215.tar.gz &amp;&amp; mv miniupnpc-1.5.20110215 miniupnpc</p></li>
  </ul>
  
  <p>Note that the reason for using the binary miniupnpc release is that I
  was unable to get it to build on my system.</p>
  
  <p>Add C:\MinGW\bin to your PATH environment variable (Google is your
  friend as it depends on your Windows Version).</p>
  
  <p><strong>In the DOS Shell:</strong></p>
  
  <p>wxWidgets:</p>

<pre><code>cd \wxWidgets-2.9.1-mgw\build\msw
mingw32-make -f makefile.gcc
</code></pre>
  
  <p>Boost:</p>

<pre><code>cd \boost-1.43.0-mgw
\bjam\bjam.exe toolset=gcc --build-type=complete stage
</code></pre>
  
  <p><strong>In the msys Shell (MinGW shell in your start folder or
  C:\MinGW\msys\1.0\msys.bat):</strong></p>
  
  <p>OpenSSL:</p>

<pre><code>cd /c/openssl-1.0.0c-mgw
./config
make
perl util/mkdef.pl 32 libeay enable-static-engine &gt; libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32 
</code></pre>
  
  <p>Copy the libeay32.dll file
  to the folder where you are building/running bitcoin.</p>
  
  <p>Berkeley DB:</p>

<pre><code>cd /c/db-4.7.25.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make
</code></pre>
  
  <p><strong>Bitcoin</strong></p>
  
  <p>If you wish to use git to pull keep a local repository, you'll have to
  download msgit from
  <a href="http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&amp;can=2&amp;q=" rel="nofollow noreferrer">http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&amp;can=2&amp;q=</a> . Otherwise, you can download the latest zip of bitcoin from
  <a href="https://github.com/bitcoin/bitcoin/zipball/master" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/zipball/master</a> In the msys shell,
  cd to the unzipped location and</p>

<pre><code>make -f makefile.mingw
</code></pre>
  
  <p>Run with ./bitcoin.exe (make sure you have the libeay32.dll in bitcoin
  folder)</p>
</blockquote>

CC BY-SA 3.0
2011-09-09T10:12:49.860Z
2014-10-19T23:06:44.737Z
2017-05-23T12:34:59.703Z
Serith
<p>I am trying to build the current Bitcoin source in Windows 7x64 - Does anyone know of an idiot-proof tutorial? Some of the steps in the <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/build-msw.txt">included doc</a> give me errors.</p>

<p>When I try to tar openssl with msys, I get symlink errors.</p>

<p>Is there a better walk-through?</p>

<development><windows><compiling><bitcoin-qt-setup>
How do I build Bitcoin source in Windows 7?
Alex Waters
# How do I build Bitcoin source in Windows 7?

(Asked by: username_0 on 2011-09-05)

I am trying to build the current Bitcoin source in Windows 7x64 - Does anyone know of an idiot-proof tutorial? Some of the steps in the [included doc](https://github.com/bitcoin/bitcoin/blob/master/doc/build-msw.txt) give me errors.

When I try to tar openssl with msys, I get symlink errors.

Is there a better walk-through?

**Tags:** development, windows, compiling, bitcoin-qt-setup


---

## 1 answers

### Answer by username_1 on 2011-09-09. Score: 16 | Accepted answer

Take a look at [Windows Build Instructions](https://bitcointalk.org/index.php?topic=5851.msg86700#msg86700) By Matt Corallo, it's outdated, but has some additional comments to the [included doc](https://github.com/bitcoin/bitcoin/blob/master/doc/build-msw.txt).

> **Install:**
>
> * MinGW Automated Installer from  
>   <http://sourceforge.net/projects/mingw/files/OldFiles/mingw-get-inst/mingw-get-inst-20110316/>.
>   Install with the C++ and MSYS options checked.
> * Activestate Perl (for building openssl) from  
>   <http://www.activestate.com/activeperl/downloads>. You don't need  
>   anything except ActivePerl and Perl, none of the other fancy crap.  
>   You do want to add Perl to your PATH (its an option in the  
>   installer).
>
> **Download:**
>
> * WxWidgets 2.9.1:  
>   <http://sourceforge.net/projects/wxwindows/files/2.9.1/wxWidgets-2.9.1.zip/download>.
>   Unzip to C:\wxWidgets-2.9.1-mgw
> * OpenSSL 1.0.0d:
>   <http://www.openssl.org/source/openssl-1.0.0d.tar.gz>. Untar to
>   C:\openssl-1.0.0c-mgw (yes bitcoin is designed to build with
>   1.0.0c, but might as well use the latest version since it works right?) Hint: untar using the tar binary which is included in MinGW (do not use 7-zip, [it will not handle symlinks correctly](https://stackoverflow.com/questions/10102873/undefined-reference-to-winmain16-with-cygwin-and-mingw-in-openssl)) using cd \c\ && tar xvvf\c\Users\Matt\Downloads\openssl-1.0.0d.tar.gz && mv openssl-1.0.0d openssl-1.0.0c-mgw in the msys shell
> * Berkeley DB 4.7.25 NC: <http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip>. Unzip to C:\db-4.7.25.NC-mgw
> * Boost 1.43.0:  
>   <http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.zip/download>. Unzip to C:\boost-1.43.0-mgw
> * Boost Jam:  
>   <http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download>. Unzip wherever you like, I used C:\bjam
> * miniUPnPc binary  
>   <http://miniupnp.tuxfamily.org/files/download.php?file=upnpc-exe-win32-20110215.zip>.
>   Unzip to C:\upnpc-exe-win32-20110215
> * miniUPnPc source  
>   <http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.20110215.tar.gz>. Untar to C:\upnpc-exe-win32-20110215\miniupnpc (you only need \*.h, but the others won't hurt) untar with cd \c\upnpc-exe-win32-20110215 && tar xvvf \c\Users\Matt\Downloads\miniupnpc-1.5.20110215.tar.gz && mv miniupnpc-1.5.20110215 miniupnpc
>
> Note that the reason for using the binary miniupnpc release is that I
> was unable to get it to build on my system.
>
> Add C:\MinGW\bin to your PATH environment variable (Google is your
> friend as it depends on your Windows Version).
>
> **In the DOS Shell:**
>
> wxWidgets:
>
> ```
> cd \wxWidgets-2.9.1-mgw\build\msw
> mingw32-make -f makefile.gcc
>
> ```
>
> Boost:
>
> ```
> cd \boost-1.43.0-mgw
> \bjam\bjam.exe toolset=gcc --build-type=complete stage
>
> ```
>
> **In the msys Shell (MinGW shell in your start folder or
> C:\MinGW\msys\1.0\msys.bat):**
>
> OpenSSL:
>
> ```
> cd /c/openssl-1.0.0c-mgw
> ./config
> make
> perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
> dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32 
>
> ```
>
> Copy the libeay32.dll file
> to the folder where you are building/running bitcoin.
>
> Berkeley DB:
>
> ```
> cd /c/db-4.7.25.NC-mgw/build_unix
> sh ../dist/configure --enable-mingw --enable-cxx
> make
>
> ```
>
> **Bitcoin**
>
> If you wish to use git to pull keep a local repository, you'll have to
> download msgit from
> <http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&can=2&q=> . Otherwise, you can download the latest zip of bitcoin from
> <https://github.com/bitcoin/bitcoin/zipball/master> In the msys shell,
> cd to the unzipped location and
>
> ```
> make -f makefile.mingw
>
> ```
>
> Run with ./bitcoin.exe (make sure you have the libeay32.dll in bitcoin
> folder)


---

