为什么这里找不到这个简单的 showMessage 对话框标识符
Why this simple showMessage dialog identifier is not found here
我正在使用来自 here 的以下简单代码:
program LazMessage;
uses
Dialogs;
begin
ShowMessage('This is a message from Lazarus');
end.
但是,它给出了以下错误:
fpc gui_showmsg.pas
Free Pascal Compiler version 3.0.0+dfsg-11+deb9u1 [2017/06/10] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling gui_showmsg.pas
gui_showmsg.pas(6,3) Error: Identifier not found "ShowMessage"
gui_showmsg.pas(9) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
添加 {$mode delphi}
或 {$mode objfpc}
没有任何区别。
问题出在哪里,如何解决?
不幸的是,ShowMessage
适用于 Lazarus 而不是 FreePascal。所以,你不能在 FreePascal 中使用它。
我正在使用来自 here 的以下简单代码:
program LazMessage;
uses
Dialogs;
begin
ShowMessage('This is a message from Lazarus');
end.
但是,它给出了以下错误:
fpc gui_showmsg.pas
Free Pascal Compiler version 3.0.0+dfsg-11+deb9u1 [2017/06/10] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling gui_showmsg.pas
gui_showmsg.pas(6,3) Error: Identifier not found "ShowMessage"
gui_showmsg.pas(9) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
添加 {$mode delphi}
或 {$mode objfpc}
没有任何区别。
问题出在哪里,如何解决?
不幸的是,ShowMessage
适用于 Lazarus 而不是 FreePascal。所以,你不能在 FreePascal 中使用它。