我安装了 OCaml 库。为了证明我有这个:
$ ~/.opam/bin/opam install camlp4
[NOTE] Package camlp4 is already installed (current version is 4.02+system).
和这个:
$ ls `ocamlc -where`/camlp4*
Camlp4.cmi Camlp4Bin.cmx Camlp4Parsers Camlp4Top.cmi camlp4fulllib.a camlp4lib.a camlp4o.cma camlp4orf.cma camlp4prof.cmx camlp4rf.cma
Camlp4Bin.cmi Camlp4Bin.o Camlp4Printers Camlp4Top.cmo camlp4fulllib.cma camlp4lib.cma camlp4of.cma camlp4prof.cmi camlp4prof.o
Camlp4Bin.cmo Camlp4Filters Camlp4Top Camlp4_config.cmi camlp4fulllib.cmxa camlp4lib.cmxa camlp4oof.cma camlp4prof.cmo camlp4r.cma
但是当我尝试这个时,它无法识别文件
$ ocamlfind query camlp4
ocamlfind: Package `camlp4' not found
我该如何启用它?
我的~/.ocamlinit
样子是这样的:
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
#use "topfind";;