I've noticed many programs are still released with 32-bit binaries or even only a 32-bit binary. How common are 32-bit systems? i.e., how many 32-bit vs. 64-bit systems are out there?
This is important to help decide whether to continue shipping 32-bit versions of software.
Unless your application really needs more than 2GiB of memory space, or gains a significant benefit from the new and faster x64 operations, there's no need to move away from building for 32-bit x86, given x64's 100% backwards-compatibility (but 16-bit x86 is a different matter entirely) - ideally keep things simpler for your users with a single executable file which can run anywhere (at least on all Windows installs anywhere).
The answer to your question varies depending on the target user base:
User-Agent
header often tells you what OS people are using with a text string that often includes the CPU architecture (e.g. Chrome reports Win64; x64
).Rather than making a commitment to either 32-bit or 64-bit when it comes to distributing your executable, you can do both: While Windows PE executables (.exe
and .dll
files) unfortunately do not have the "fat binary" feature that macOS does (where a single executable can contain instructions for different architectures) you can actually fake a fat-binary using a workaround on Windows, as used by Sysinternals' utility programs; which is to have a 32-bit executable that contains the 64-bit binary as an embedded resource, and runs like so:
.exe
version to a temporary directory