build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe #22230

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:210612-msvc changing 1 files +1 −0
  1. hebasto commented at 2:41 PM on June 12, 2021: member

    On master (6f3fbc062f97183f19a8551177371cc74a33351d), running bitcoin-qt.exe, which was built with MSVC, causes a terminal window open along with the GUI.

    This PR fixes such behavior. See Microsoft docs.

    It is still possible to use the -printtoconsole option for debug builds.

  2. build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe
    It is still possible to use -printtoconsole option for debug builds.
    9edd713c18
  3. hebasto requested review from sipsorcery on Jun 12, 2021
  4. hebasto added the label Build system on Jun 12, 2021
  5. hebasto added the label Windows on Jun 12, 2021
  6. sipsorcery commented at 3:05 PM on June 12, 2021: member

    Nice find, dunno how I missed that, should have been the first thing I checked rather than assuming it was a Qt quirk.

    The fix works for me. It also needs to be added into the Debug configuration block 10 lines or so below.

  7. hebasto commented at 3:09 PM on June 12, 2021: member

    The fix works for me. It also needs to be added into the Debug configuration block 10 lines or so below.

    It is intentional:

    It is still possible to use the -printtoconsole option for debug builds.

  8. sipsorcery approved
  9. sipsorcery commented at 3:19 PM on June 12, 2021: member

    tACK 9edd713c184bd6b92ff7862d0df8f1a89062e9d3.

  10. fanquake commented at 5:24 AM on June 13, 2021: member

    If "WINDOWS is the default", why do we need to set this? What subsystem do we end up using currently?

    Ah I see, CONSOLE is actually the default, unless WinMain or wWinMain is defined.

  11. sipsorcery commented at 7:16 AM on June 13, 2021: member

    Ah I see, CONSOLE is actually the default, unless WinMain or wWinMain is defined.

    It's also set to CONSOLE in the common.init.vcxproj file and needs to be overridden.

  12. fanquake merged this on Jun 14, 2021
  13. fanquake closed this on Jun 14, 2021

  14. hebasto deleted the branch on Jun 14, 2021
  15. sidhujag referenced this in commit c767a805d0 on Jun 14, 2021
  16. gwillen referenced this in commit 4d722d6ce1 on Jun 1, 2022
  17. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me