构建 Windows XP 即使是特殊的工具链也会失败

Building for Windows XP fails even the special toolchain

我正在使用 Visual Studio 2013 将 C++ 项目构建到 32 位 .exe 中,指定 平台工具集: Visual Studio 2013 - Windows XP (v120_xp)

当我尝试在装有 Windows XP 的机器上 运行 新的 .exe 时,出现 .exe is not a valid Win32 application 错误。

我还必须做些什么才能在 XP 上实现 运行?

我还必须添加两个现在无法更改的约束:

  1. 编译器必须是MSVC

  2. 我不能使用比 Visual Studio 2013 (v120 & v120_xp)

  3. 更早的版本

我还能做什么?

  1. 单击开始,然后单击 运行。

  2. 键入 "command.com",然后按 Enter。 (打开 DOS window。)

  3. 键入以下内容:

     "cd\"
    
     "cd \windows"
    

    输入每一项后按回车键。

  4. 键入复制 "regedit.exe regedit.com",然后按 Enter。

  5. 键入 "start regedit.com",然后按 Enter。

  6. 导航到 select 键:

    HKEY_CLASSES_ROOT\exefile\shell\open\command

  7. 在右窗格中,双击(默认)值。

  8. 删除当前数值数据,然后输入:

    “%1”%*

    提示:输入字符:quote-percent-one-quote-space-percent-asterisk.

  9. 关闭 Regedit 实用程序。