2012-11-22 41 views
2
**Build mode: shared 
ocamlbuild -no-links syntax.otarget byte.otarget src/batteries_help.cmo META shared.otarget 

Finished, 0 targets (0 cached) in 00:00:00. 

+ ocamlfind ocamlc -c -g -annot -warn-error A -package camomile,num,str -package camlp4.lib -pp camlp4of -pp camlp4of -I libs/estring -I benchsuite -I src -I testsuite -I build -I qtest -I libs -I src/syntax/pa_comprehension -I src/syntax/pa_strings -o libs/estring/pa_estring_top.cmo 
libs/estring/pa_estring_top.ml 

File "libs/estring/pa_estring_top.ml", line 18, characters 15-44: 

Error: Unbound module Toploop 

Command exited with code 2.** 


Compilation unsuccessful after building 6 targets (5 cached) in 00:00:00.** 

我在路径中找到toploop.cmi:ocaml的电池编译:未绑定模块Toploop

cd OCaml/lib/ocaml/compiler-libs/ 
ls topl* 

toploop.cmi 

,正如你看到的,

export PATH=/home/xxx/OCaml/lib/ocaml/compiler-libs/:$PATH 

我已经/home/xxx/...因为我的系统路径。但它仍然没有工作。我应该做些什么来包含模块toploop?

+0

非常感谢您的编辑。我是一朵新花。我将注意我未来问题中的格式。 :) – Canoe

回答

2

你似乎在用OCaml 4.00编译电池(哪个版本?),它引入了新的compiler-libs目录(但是有些发行版之前有一个可能会关闭)。 toploop曾经位于OCaml stdlib目录的根目录,但您现在应该在某处添加-I +compiler-libs选项,或使用相应的ocamlfind包装(-package compiler-libs.toplevel)。

+0

电池的版本是1.4.1。该系统有两个版本的OCaml,分别是3.09和4.00。 3.09一个在/ usr/..,另一个在/ home/xxx/OCaml。我没有权限将其安装在/ usr/...路径中。 – Canoe

+0

文件“libs/estring/pa_estring_top.ml”,第18行,字符15-44 :.该pa_estring_top.ml代码是在这里: – Canoe

+0

让_ = 令解析= Toploop.parse_toplevel_phrase和lexbufs = REF []中 Toploop.parse_toplevel_phrase:!= 〜 – Canoe