2
我安裝了OCaml庫。爲了證明我有這個:爲什麼ocamlfind無法找到已安裝的庫(camlp4)
$ ~/.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";;
'〜/ .ocamlinit'是頂層ocaml執行的初始文件,與ocamlfind無關'。 – ChriS