我在 Eclipse Indigo 下遇到 OCaIDE 问题。我有一个新的 OCaml 托管项目和几个模块。这是它在我的工作区资源管理器中的外观:
所有这些文件都有错误(.mli 文件是自动创建的),声音(例如 file accum.ml
)
Error: I/O error: lab2/accum.cmo: No such file or directory
并且目录中确实没有这样的文件。我只是无法让 OCaIDE 创建这些文件。我尝试过自动构建、手动构建、清理,我能想到的任何东西。插件配置中设置的 OCaml 路径似乎没问题,因为顶级解释器工作正常。
此外,以下是项目中的一些文件:
accum.ml:
let reverseInt n =
let rec reverseAccum n accum = match n with
| 0 -> accum
| n -> reverseAccum (n/10) (10*accum + (n mod 10))
in reverseAccum n 0
。项目:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lab2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>Ocaml.ocamlbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ocaml.ocamlnature</nature>
</natures>
</projectDescription>
.路径:
.
/usr/lib/ocaml
我将衷心感谢您的帮助。
编辑:也许这也很重要,我使用 Ubuntu 12.04 64 位和 OCaml 3.12.1
Edit2:这是一些编译器输出:
Building: lab2/simple.mli
File "lab2/simple.mli", line 1, characters 0-1:
Error: I/O error: lab2/simple.mli: No such file or directory
Building: lab2/simple.ml
File "lab2/simple.ml", line 1, characters 0-1:
Error: I/O error: lab2/simple.cmo: No such file or directory
Building: lab2/lists.mli
File "lab2/lists.mli", line 1, characters 0-1:
Error: I/O error: lab2/lists.mli: No such file or directory
Building: lab2/lists.ml
File "lab2/lists.ml", line 1, characters 0-1:
Error: I/O error: lab2/lists.cmo: No such file or directory
Building: lab2/bst.mli
File "lab2/bst.mli", line 1, characters 0-1:
Error: I/O error: lab2/bst.mli: No such file or directory
Building: lab2/bst.ml
File "lab2/bst.ml", line 1, characters 0-1:
Error: I/O error: lab2/bst.cmo: No such file or directory
Building: lab2/accum.mli
File "lab2/accum.mli", line 1, characters 0-1:
Error: I/O error: lab2/accum.mli: No such file or directory
Building: lab2/accum.ml
File "lab2/accum.ml", line 1, characters 0-1:
Error: I/O error: lab2/accum.cmo: No such file or directory