2017-02-27 60 views
1

下面不能与`gforthmi`

." Hello, world!" 
bye 

显示的应用程序编译图像创建通过gforthmi stdout.4th编译时出现以下错误:通过安装在Ubuntu系统上

/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: 
$7F416215C970 throw 
$7F41621924F8 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。

我在编译图像的方式上犯了错误吗?我是否缺少任何选项?

+0

我试过时无法使它工作,所以我没有真正的答案。我认为它部分使用了'gforthmi stdout.fi stdout.4th'形式(第一个参数是*** output ***文件,所以如果使用表单的话,输入文件stdout.4th将被*销毁*(覆盖)在Raspberry Pi上部分设置环境变量'GFORTHD'(eg export GFORTHD =/usr/lib/arm-linux-gnueabihf/gforth/0.7.0/gforth-ditc)。但是,这还不够。我真的不知道如何处理* [13.5.1 gforthmi](http://www.hep.by/gnu/gforth/gforthmi.html)*中提到的'savingystem'这个词。 –

+2

'gforthmi'是一个shell脚本(文本文件),例如在'/ usr/bin/gforthmi'(位于'which which gforthmi')。它可能会也可能不会帮助看看它。 –

回答

1

有几个问题涉及。

由于某种原因,在ubuntu上的gforth-ditc位于不同的路径。不在/usr/bin之下,但在/use/lib/$MACHTYPE/gforth/$version之下。即为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

另一个提示 - 您的测试样本将在编译过程中被解释,但不会为生成的图像提供任何代码。至少在你的图片加载后至少定义一些要调用的词:)