<p>Since this is the first result that pops up on google when searching "bitcoin windows depends build" and the user asked how to build the .exe (but was actually looking for static build instructions on ubuntu) the correct instructions would be to use cross compilation with the depends system as specified in the documentation here: <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md</a> . The important part is that it will probably only run on Ubuntu 14.04. Install the dependencies as listed in the build-windows readme then build using:</p>

<pre><code>cd depends
make HOST=x86_64-w64-mingw32
cd ..
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
make
</code></pre>

CC BY-SA 4.0
2019-08-04T17:35:20.177Z
I followed your steps but I still don't have an exe file. I'm trying to build on ubuntu to make an exe that will run on windows 10. I can get it to build for ubuntu but not for windows.
Patrick W. McMahon
CC BY-SA 3.0
2017-09-18T22:05:50.317Z
2017-10-20T09:21:13.720Z
2017-10-20T09:21:13.720Z
TheCharlatan
<p>An alternative solution would be to build a tarball archive like the one you can download from the Bitcoin Core website.</p>

<p>To do that you have to follow the release process, as explained in:
<a href="https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md</a>
The process actually consists in creating a Gitian build:
<a href="https://github.com/bitcoin-core/docs/blob/master/gitian-building.md" rel="nofollow noreferrer">https://github.com/bitcoin-core/docs/blob/master/gitian-building.md</a></p>

<p>Since, the instructions on the website can be kind of confusing, I wrote a small guide based on my personal experience:
<a href="https://gist.github.com/frz-dev/3e3e906fa06294e61930e81b473e1e5b#file-bitcoin-core-gitian-build-guide_debian-script-txt" rel="nofollow noreferrer">https://gist.github.com/frz-dev/3e3e906fa06294e61930e81b473e1e5b#file-bitcoin-core-gitian-build-guide_debian-script-txt</a></p>

<p>This process allows to create the Bitcoin binaries for all platforms (Linux, Windows, Mac OSX)</p>

CC BY-SA 3.0
2017-10-20T10:18:29.597Z
2017-10-20T10:18:29.597Z
FedFranz
<p><code>.exe</code> files are for windows only. Linux systems do not use the same file extension or file type as windows. I assume you just want to create a Linux binary that can be used on all systems without installing all dependencies. To do that, you can use Bitcoin Core's depends system. Instructions are here: <a href="https://github.com/bitcoin/bitcoin/tree/master/depends" rel="noreferrer">https://github.com/bitcoin/bitcoin/tree/master/depends</a>.</p>

<p>Basically, all you need to do is (starting from the source root directory):</p>

<pre><code>cd depends
make
cd ..
./configure --prefix=`pwd`/depends/x86_64-linux-gnu # Actually check what folder is created in depends after you built the dependencies and use that instead
make
</code></pre>

<p>Once you do that, the binaries that are produced can be moved to and used on any linux system. The binaries are located at (from the source root dir) <code>src/bitcoind</code>, <code>src/qt/bitcoin-qt</code>, <code>src/bitcoin-cli</code>, and <code>src/bitcoin-tx</code></p>

CC BY-SA 3.0
2017-06-13T19:45:31.380Z
Thank you, that explains a lot :) I am completely new to linux, hence my confusion. So if I want to use this on another computer, I just move the binaries to the other computer? Will I have to install them in some way? In addition to the ones you mentioned, it seems as if I also have `bench_bitcoin`, `test_litecoin` and `test_litecoin-qt`. Should I move those over to the other computer as well?
user3600338
CC BY-SA 3.0
2017-06-13T19:51:28.833Z
Yes, just move the binaries to another computer that is also running linux. Each binary is standalone, so you don't actually need anything else if you don't want to use them. You will need to "install" the binaries if you want to use them from anywhere on your computer. This just means putting them in a folder that is on your system's PATH. Otherwise you will need to give a path to the binary every time you want to run it.
Ava Chow
CC BY-SA 3.0
2018-02-08T11:26:28.937Z
Then how to make windows runnable build file from ubuntu?
creator
CC BY-SA 3.0
2018-02-08T15:27:32.290Z
@leegod The instructions are linked in my answer.
Ava Chow
CC BY-SA 3.0
2018-02-08T15:53:50.747Z
@AndrewChow I want more direct and specific answer. so, result is, like this? [./configure --prefix=`pwd`/depends/x86_64-w64-mingw32] ?
creator
CC BY-SA 3.0
2018-02-08T15:55:11.470Z
and after do those lines, windows exe file generated? For lite normal users who want to just wallet of my own alt-coin.
creator
CC BY-SA 3.0
2018-02-08T16:03:54.777Z
`cd` into `depends` and do `make HOST=x86_64-w64-mingw32 -j4`. `cd` back out and do `./configure --prefix=\`pwd\`/depends/x86_64-w64-mingw32`. Then when you do `make` you will produce `.exe` files which only work on windows.
Ava Chow
CC BY-SA 3.0
2017-06-13T16:40:03.450Z
2017-06-13T16:40:03.450Z
Ava Chow
<p>After struggeling with the dependencies for a while, I finally managed to compile Bitcoin-Qt on my Ubuntu machine. I used the following commandos for compiling:</p>

<pre><code>./autogen.sh
./configure -with-gui
make
sudo make install
</code></pre>

<p>Now when I write <code>bitcoin-qt</code> in the terminal, the wallet will succesfully start. However, I am not able to locate bitcoin-qt.exe on my computer. I want to be able to get the .exe and put it on other machines without having to install all the dependencies on them as well. How would I go about creating this .exe?</p>

CC BY-SA 3.0
2017-06-13T13:53:23.707Z
Wait a second.  .exe files are used on Windows, not Linux (your executable file is simply named `bitcoin-qt` and is probably in `/usr/local/bin`).  Are you wanting to compile a version for Windows computers (that's called **cross-compiling**), or a version to run on other Linux computers without installing other dependencies (that's called **static linking**)?
Nate Eldredge
<bitcoin-core><ubuntu><linux><compiling><bitcoin-qt-setup>
How to compile Bitcoin-Qt as an .exe on Ubuntu?
user3600338
# How to compile Bitcoin-Qt as an .exe on Ubuntu?

(Asked by: username_0 on 2017-06-13)

After struggeling with the dependencies for a while, I finally managed to compile Bitcoin-Qt on my Ubuntu machine. I used the following commandos for compiling:

```
./autogen.sh
./configure -with-gui
make
sudo make install

```

Now when I write `bitcoin-qt` in the terminal, the wallet will succesfully start. However, I am not able to locate bitcoin-qt.exe on my computer. I want to be able to get the .exe and put it on other machines without having to install all the dependencies on them as well. How would I go about creating this .exe?

**Tags:** bitcoin-core, ubuntu, linux, compiling, bitcoin-qt-setup

> **Comments:**
> **username_1**: Wait a second.  .exe files are used on Windows, not Linux (your executable file is simply named `bitcoin-qt` and is probably in `/usr/local/bin`).  Are you wanting to compile a version for Windows computers (that's called **cross-compiling**), or a version to run on other Linux computers without installing other dependencies (that's called **static linking**)?  

---

## 3 answers

### Answer by username_5 on 2017-06-13. Score: 8 | Accepted answer

`.exe` files are for windows only. Linux systems do not use the same file extension or file type as windows. I assume you just want to create a Linux binary that can be used on all systems without installing all dependencies. To do that, you can use Bitcoin Core's depends system. Instructions are here: <https://github.com/bitcoin/bitcoin/tree/master/depends>.

Basically, all you need to do is (starting from the source root directory):

```
cd depends
make
cd ..
./configure --prefix=`pwd`/depends/x86_64-linux-gnu # Actually check what folder is created in depends after you built the dependencies and use that instead
make

```

Once you do that, the binaries that are produced can be moved to and used on any linux system. The binaries are located at (from the source root dir) `src/bitcoind`, `src/qt/bitcoin-qt`, `src/bitcoin-cli`, and `src/bitcoin-tx`

> **Comments:**
> **username_0**: Thank you, that explains a lot :) I am completely new to linux, hence my confusion. So if I want to use this on another computer, I just move the binaries to the other computer? Will I have to install them in some way? In addition to the ones you mentioned, it seems as if I also have `bench_bitcoin`, `test_litecoin` and `test_litecoin-qt`. Should I move those over to the other computer as well?  
> **username_5**: Yes, just move the binaries to another computer that is also running linux. Each binary is standalone, so you don't actually need anything else if you don't want to use them. You will need to "install" the binaries if you want to use them from anywhere on your computer. This just means putting them in a folder that is on your system's PATH. Otherwise you will need to give a path to the binary every time you want to run it.  
> **username_6**: Then how to make windows runnable build file from ubuntu?  
> **username_5**: @leegod The instructions are linked in my answer.  
> **username_6**: @AndrewChow I want more direct and specific answer. so, result is, like this? [./configure --prefix=`pwd`/depends/x86_64-w64-mingw32] ?  
> **username_6**: and after do those lines, windows exe file generated? For lite normal users who want to just wallet of my own alt-coin.  
> **username_5**: `cd` into `depends` and do `make HOST=x86_64-w64-mingw32 -j4`. `cd` back out and do `./configure --prefix=\`pwd\`/depends/x86_64-w64-mingw32`. Then when you do `make` you will produce `.exe` files which only work on windows.  

---

### Answer by username_2 on 2017-09-18. Score: 4

Since this is the first result that pops up on google when searching "bitcoin windows depends build" and the user asked how to build the .exe (but was actually looking for static build instructions on ubuntu) the correct instructions would be to use cross compilation with the depends system as specified in the documentation here: <https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md> . The important part is that it will probably only run on Ubuntu 14.04. Install the dependencies as listed in the build-windows readme then build using:

```
cd depends
make HOST=x86_64-w64-mingw32
cd ..
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
make

```

> **Comments:**
> **username_3**: I followed your steps but I still don't have an exe file. I'm trying to build on ubuntu to make an exe that will run on windows 10. I can get it to build for ubuntu but not for windows.  

---

### Answer by username_4 on 2017-10-20. Score: 2

An alternative solution would be to build a tarball archive like the one you can download from the Bitcoin Core website.

To do that you have to follow the release process, as explained in:
<https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md>
The process actually consists in creating a Gitian build:
<https://github.com/bitcoin-core/docs/blob/master/gitian-building.md>

Since, the instructions on the website can be kind of confusing, I wrote a small guide based on my personal experience:
<https://gist.github.com/frz-dev/3e3e906fa06294e61930e81b473e1e5b#file-bitcoin-core-gitian-build-guide_debian-script-txt>

This process allows to create the Bitcoin binaries for all platforms (Linux, Windows, Mac OSX)


---

