OCaml的电池编译:未绑定模块Toploop(ocaml batteries compiling

2019-08-03 01:58发布

**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:

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

toploop.cmi

正如你看到的,

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

我已经做/home/xxx/...我的系统路径。 但它仍然没有奏效。 我应该怎么做,包括模块toploop?

Answer 1:

你似乎与OCaml的4.00,其中介绍了新来编译电池(哪个版本?) compiler-libs目录(但一些发行了一个之前,这样可能会关闭)。 toploop曾经是在OCaml的STDLIB的根目录,但你现在应该加-I +compiler-libs选项某处,或使用相应的ocamlfind包装( -package compiler-libs.toplevel )。



文章来源: ocaml batteries compiling : Unbound module Toploop