5
在我的cygwin機器上安裝了Ocaml,但編譯失敗。通過下面的交互可以看到權限沒有問題。 OCAMLLIB是對的;哪裏不對?爲什麼無法打開pervasives.cmi?
$ cat t.ml
print_string "hi";
$ ocamlopt t.ml
>> Fatal error: cannot open pervasives.cmi
Fatal error: exception Misc.Fatal_error
$ echo $OCAMLLIB
/cygdrive/c/OCaml/lib
$ ls -l /cygdrive/c/OCaml/lib/pervasives.cmi
-rwxrwxrwx+ 1 Lyn None 15094 Oct 8 01:30 /cygdrive/c/OCaml/lib/pervasives.cmi
yes確實在cmd shell下運行正常,但是這裏是來自這裏的ocaml的cygwin版本:http://protz.github.com/ocaml-installer/ –
我發現這個[message thread](http:/ /lists.gforge.inria.fr/pipermail/frama-c-discuss/2009-December/001653.html),可能會提供關於如何設置OCAMLLIB環境變量的有用提示。 –
輝煌!把它放在你的答案中,我會接受:export OCAMLLIB = C:\\ OCaml \\ lib –