2

I followed the steps mentioned in the below link:

https://github.com/bitcoin/bitcoin/tree/master/build_msvc

Trying to build from https://github.com/bitcoin/bitcoin/tree/0.20

visual-studio-error

Errors:


Error   C1083   Cannot open include file: 'QApplication': No such file or directory bitcoin-qt  \bitcoin-0.20.1\src\qt\bitcoin.h    12
Error    MSB3073 The command "C:\Qt5.9.8_x64_static_vs2019\bin\moc.exe  "..\..\src\qt\test\addressbooktests.h" -o .\QtGeneratedFiles\qt\moc\moc_addressbooktests.cpp" exited with code 3.    test_bitcoin-qt \bitcoin-0.20.1\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj  103
Error    MSB3073 The command "C:\Qt5.9.8_x64_static_vs2019\bin\moc.exe  "..\..\src\qt\bitcoinamountfield.cpp" -o .\QtGeneratedFiles\qt\bitcoinamountfield.moc" exited with code 3.   libbitcoin_qt   \bitcoin-0.20.1\build_msvc\libbitcoin_qt\libbitcoin_qt.vcxproj  168

Related Questions:

building bitcoin-qt.exe using Visual Studio 2017

Environment for building Bitcoin core in Windows

https://bitcointalk.org/index.php?topic=5264661.0

https://github.com/bitcoin/bitcoin/issues/17864

4
  • Are you trying to build Qt as well or just Bitcoin Core? If you don't want to build Qt you can download a pre-built version from github.com/sipsorcery/qt_win_binary.
    – sipsorcery
    Sep 29, 2020 at 6:54
  • I want to build qt as well
    – user103136
    Sep 29, 2020 at 9:20
  • Building Qt on Windows is a major challenge and not related to Bitcoin. The instructions in the readme on the GitHub repo I posted above will be able to get you started. It literally took me weeks to get the right configure options to produce a build that matched what Bitcoin Core needed.
    – sipsorcery
    Sep 29, 2020 at 10:33
  • And just to add I'd highly recommend using the pre-built Qt binaries I've put on that repo as a starting point. Once you can build Bitcoin Core then the next step would be to attempt to build your own Qt binaries and switch to them.
    – sipsorcery
    Sep 29, 2020 at 10:40

1 Answer 1

1

The process of migrating the Bitcoin Core project to the CMake-based build system is currently underway. Once completed, it will enable flawless building of Bitcoin Core using Visual Studio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.