如何设置最低要求Windows?

How to set the minimum required Windows?

如何使用 $SETPEFLAG 设置 Windows 的最低要求版本?可以用 editbin.exe "$(TargetPath)" /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1 例如。

您不能使用 {$SetPeFlags} 指令设置最低 OS 版本。您必须改为在项目选项中设置它,在 Linking 页面上:

Project | Options | Delphi Compiler | Linking
Set OS Version fields in PE header as <major>.<minor>

默认值为 5.0 (Windows 2000)。