无法使用 `gforthmi` 编译图像

Can't compile image with `gforthmi`

下面显示的应用程序

." Hello, world!"
bye

通过gforthmi stdout.4th编译时产生以下错误:

/usr/bin/gforthmi: 47: /usr/bin/gforthmi: /usr/lib/gforth/0.7.3/gforth-ditc: not found
/usr/bin/gforthmi: 48: /usr/bin/gforthmi: /usr/lib/gforth/0.7.3/gforth-ditc: not found
redefined th  
*OS command line*:-1: No such file or directory
comp-image >>>./temp-image.fi1<<< ./temp-image.fi2 stdout.4th bye
Backtrace:
F416215C970 throw 
F41621924F8 slurp-file 
rm: cannot remove './temp-image.fi1': No such file or directory
rm: cannot remove './temp-image.fi2': No such file or directory

我 运行 gforth 0.7.3 通过官方 Ubuntu PPA 安装在 Ubuntu 系统上。

我编译图像的方式有误吗?我是否遗漏了任何选项?

涉及到几个问题。

由于某种原因,ubuntu 上的 gforth-ditc 位于不同的路径中。不在 /usr/bin 之下,而是在 /use/lib/$MACHTYPE/gforth/$version 之下。 IE。对于 64 位 ubuntu 和 gforth 版本 0.7.2,我将它放在 /usr/lib/x86_64-linux-gnu/gforth/0.7.2/gforth-ditc。在您的系统中找到它并使用 GFORTHD 环境变量指定。

第二个问题是你的测试样本。它不应该以 bye 结尾,因为这将终止 gforth-ditc(由 gforthmi 使用)而可能不会保存任何内容,因为 savesystem 字作为参数传递给 gforth-ditc 永远达不到。

另一个提示 - 您的测试样本将在编译期间进行解释,但不会为生成的图像贡献任何代码。至少定义一些在你的图像加载后要调用的词:)