2017-02-27 34 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

另一個提示 - 您的測試樣本將在編譯過程中被解釋,但不會爲生成的圖像提供任何代碼。至少在你的圖片加載後至少定義一些要調用的詞:)