【发布时间】:2020-04-17 14:44:08
【问题描述】:
我正在做 Free Pascal 程序,当我导入模块 Crt 时,显示错误:
crt.pas(15,9) Error: Dublicate identifier "SYSTEM"
crt.pas(15,9) Error: Dublicate identifier "system"
crt.pas(116,1) Fatal: There were 2 errors compiling modele, stopping
crt.pas(0) Fatal: Compilation aborted
程序中的导入模块:
uses
Crt,
Math;
我使用的是DOS系统 在 Win10 和 Win7 PC 上编译正常
【问题讨论】:
-
这显然不会发生。请在您的 q 以及 Crt.Pas 的前 16 行中添加 minimal, reproducible example。
-
@MartynA Crt - 这是标准的免费 Pascal 库
-
好吧,我刚刚将这段代码输入到 Lazarus 中,它编译没有错误:
program UsesCrt; uses Crt, Math; begin end.。就像我说的,你需要一个 mre。 -
@MartynA 我说它是 FREE PASCAL STANDART LIBRARY,但我没有说 Lazarusm,因为这段代码可以在 Lazarus 中编译但有错误。在 Win10 pc
Crt模块上工作正常,但在 DOS 系统上 - 编译时出错。 -
Pascal ABC 不相关且不兼容。 Free Pascal 带有一个 Crt,并且应该在默认安装中。只需使用它,然后将任何剩余的 ABC 源移开。恰当地说,“复制”和“模型”的错误消息看起来很奇怪。那里发生了什么?
标签: pascal freepascal