user-interface - 为什么这里找不到这个简单的 showMessage 对话框标识符
问题描述
我在这里使用以下简单代码:
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 中使用它。
推荐阅读
- pentaho - 在 Pentaho 数据集成中从数据库表中循环通过 ID
- java - IntelliJ 不使用 Maven 的
目标字节码级别? - jquery - 将参数传递给剑道对话框jquery
- python - TensorFlow | 如何实现 10 倍交叉验证?
- css - 剑道网格排序图标消失(Angular 9)
- android - 有没有办法绕过 OpenGL ES 中的最大片段采样器?
- android - Flutter - 获取 Android 设备名称
- angularjs - Tensorflow.js 预测结果不变
- javascript - React js 中的嵌入式 .doc 和 .txt 查看器
- python - 在python中将图像转换为灰度