ocaml电池编译:未绑定模块Toploop [英] ocaml batteries compiling : Unbound module Toploop
问题描述
**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:
I have found toploop.cmi in path:
cd OCaml/lib/ocaml/compiler-libs/
ls topl*
toploop.cmi
如您所见
export PATH=/home/xxx/OCaml/lib/ocaml/compiler-libs/:$PATH
我已将/home/xxx/...
作为系统路径.但是它仍然没有用.我应该怎么做才能包含模块toploop?
I have made /home/xxx/...
as my system path. But it still did not work. What I should do to include the module toploop?
推荐答案
您似乎正在使用OCaml 4.00编译电池(哪个版本?),它引入了新的compiler-libs
目录(但是某些发行版以前有一个发行版,因此可能离开). toploop
曾经是OCaml stdlib目录的根目录,但是现在您应该在某个位置添加-I +compiler-libs
选项,或使用相应的ocamlfind包装(-package compiler-libs.toplevel
).
You appear to be compiling Batteries (which version?) with OCaml 4.00, which introduced the new compiler-libs
directory (but some distributions had one before so that may be off). toploop
used to be at the root of the OCaml stdlib's directory, but you should now add a -I +compiler-libs
option somewhere, or use the corresponding ocamlfind packaging (-package compiler-libs.toplevel
).
这篇关于ocaml电池编译:未绑定模块Toploop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!