-1

Are binaries built on Windows 7 guaranteed to work on 8/Vista, 10, and 11?

Are binaries built on Windows 10 guaranteed to work on Windows 11?

I've seen some things that make me wonder if Windows 11 is still technically Windows 10 in at least some ways that might ensure apps built on Windows 11 be sure to run on Windows 10?

I'm worried not just about the EXE format but for instance the shared library APIs etc. One can build, I'm sure, on a newer Windows and use a DLL, or a function in a DLL, that doesn't exist on the older Windows.

Swiss Frank
  • 1,985
  • 15
  • 33

1 Answers1

1

All versions of Windows support the same "Portable Executable" format for EXEs, but it all comes down to (a) the linker settings in the metadata of the binary, (b) the architecture for the processor, and (c) the APIs it needs to import.

If you build a Win32 classic desktop application using _WIN32_WINNT=0x0601, the WINAPI_FAMILY_DESKTOP API partition (the default), and use a recent version of the VC++ toolset, it will set a linker value of "6.00 operating system version". The resulting binary is compatible with Windows 7 SP1, and depending on exactly what APIs you use it might work on Windows Vista SP2 as well. It will also be forward compatible to Windows 8.x, Windows 10, and Windows 11.

Both x86 and x64 Windows support 32-bit applications, although x64 Windows does not support super-old 16-bit Windows programs that technically work on 32-bit Windows.

There are many application compatibility bugs that can make a program that should technically work on a newer version of Windows fail, but these can be avoided by just testing on newer versions of the OS before shipping.

Officially the modern VC++ toolsets, the Visual C/C++ Runtime, and Windows SDKs do not support Windows Vista, Windows 7 RTM, or Windows 8.0 development.

See Microsoft Docs.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • Many thanks. To be clear (and I'll edit my question) I'm worried not just about the EXE format but for instance the shared library APIs etc. One can build, I'm sure, on a newer Windows and use a DLL, or a function in a DLL, that doesn't exist on the older Windows. – Swiss Frank Mar 29 '22 at 09:35