Delphi 7 Exe 在非 delphi 机器上不工作

Delphi 7 Exe is not working in Non-delphi machine

最近我有机会在 delphi 7 上工作。我刚刚创建了一个显示欢迎消息的示例应用程序,并且该 exe 在 Delphi 机器上运行良好。如果我将该 exe 移动到非 delphi 机器(未安装 delphi),它会抛出错误 "The program can't start beause rtl70.bpl is missing from your computer. Try reinstalling the program to fix the problem".

如果我按照与 Delphi 5 相同的过程,它工作正常。

您构建的程序依赖于 运行时间包。这意味着每台需要 运行 程序的机器都需要有可用的 运行time 包。

有两种解决方案:

  1. 分发您与可执行文件一起使用的 运行time 包。
  2. 禁用 运行time 包,因此构建一个包含 运行time 的可执行文件。

运行时间包选项由项目选项中指定的设置决定。

除非您有一些令人信服的理由使用 运行time 包,否则第二个选项要简单得多,因为它允许可执行文件独立,没有外部依赖性。