<p>By using the pull request and instructions at <a href="https://github.com/bitcoin/bitcoin/pull/11526" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/pull/11526</a> you can build Bitcoin Core, except the two Qt dependent projects, with Visual Studio (or msbuild tools) on Windows.</p>

CC BY-SA 3.0
2017-12-08T10:24:34.253Z
2017-12-08T10:24:34.253Z
sipsorcery
<p>I am trying to build Bitcoin 0.13 for Windows. I've always used <a href="https://bitcointalk.org/index.php?topic=149479.0" rel="noreferrer">this</a> guide for building previous versions. Now seems that developers have changed their mind regarding Windows, and the new way seems cross-compile from Ubuntu. I have followed step by step <a href="https://github.com/bitcoin/bitcoin/blob/0.13/doc/build-windows.md" rel="noreferrer">the new instructions</a>, but I haven't been able to get it built. Seems that instructions are either not correct or not up to date. Here is what I've found so far:</p>

<ul>
<li>zconf.h file not found, solved manually copying it from <code>/usr/include/x86_64-linux-gnu</code> to <code>projectdir/depends/x86_64-w64-mingw32/include</code></li>
<li>[<strong>unsolved</strong>]<code>warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only</code> while compiling secp256k1 lib</li>
<li>[<strong>unsolved</strong>] I tried to <code>configure</code> and <code>make</code> secp256k1 manually before running the "main" make for solving previous issue, but then I get this error: <code>/usr/bin/x86_64-w64-mingw32-ld: attempted static link of dynamic object secp256k1/.libs/libsecp256k1.so</code></li>
</ul>

<p>I stuck here, any help is appreciated. Also, I could also accept to build on Windows (like before) if necessary, as long as it works. Thanks.</p>

CC BY-SA 3.0
2017-05-11T03:39:34.427Z
Bitcoin Core releases binaries have been cross-compiled since forever (0.3.x era), though builds on Windows have been and still are possible.
Pieter Wuille
CC BY-SA 3.0
2017-05-11T09:37:18.140Z
Many thanks for this info. So how do I solve the above errors?
user197675
CC BY-SA 4.0
2022-03-31T05:45:40.993Z
The second error, "warning: undefined symbols" may be the end of line character in the code. By the way, what is reason behind in Windows OS? The processing speed would be slower...
Cloud Cho
<bitcoin-core><windows><compiling><bitcoin-qt-setup>
How to build Bitcoin binaries for Windows on Ubuntu using cross-compile
user197675
# How to build Bitcoin binaries for Windows on Ubuntu using cross-compile

(Asked by: username_0 on 2017-05-11)

I am trying to build Bitcoin 0.13 for Windows. I've always used [this](https://bitcointalk.org/index.php?topic=149479.0) guide for building previous versions. Now seems that developers have changed their mind regarding Windows, and the new way seems cross-compile from Ubuntu. I have followed step by step [the new instructions](https://github.com/bitcoin/bitcoin/blob/0.13/doc/build-windows.md), but I haven't been able to get it built. Seems that instructions are either not correct or not up to date. Here is what I've found so far:

* zconf.h file not found, solved manually copying it from `/usr/include/x86_64-linux-gnu` to `projectdir/depends/x86_64-w64-mingw32/include`
* [**unsolved**]`warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only` while compiling secp256k1 lib
* [**unsolved**] I tried to `configure` and `make` secp256k1 manually before running the "main" make for solving previous issue, but then I get this error: `/usr/bin/x86_64-w64-mingw32-ld: attempted static link of dynamic object secp256k1/.libs/libsecp256k1.so`

I stuck here, any help is appreciated. Also, I could also accept to build on Windows (like before) if necessary, as long as it works. Thanks.

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

> **Comments:**
> **username_1**: Bitcoin Core releases binaries have been cross-compiled since forever (0.3.x era), though builds on Windows have been and still are possible.  
> **username_0**: Many thanks for this info. So how do I solve the above errors?  
> **username_2**: The second error, "warning: undefined symbols" may be the end of line character in the code. By the way, what is reason behind in Windows OS? The processing speed would be slower...  

---

## 1 answers

### Answer by username_3 on 2017-12-08. Score: 1

By using the pull request and instructions at <https://github.com/bitcoin/bitcoin/pull/11526> you can build Bitcoin Core, except the two Qt dependent projects, with Visual Studio (or msbuild tools) on Windows.


---

