Why can't pervasives.cmi be opened?

江枫思渺然 提交于 2019-12-01 03:46:37

问题


Installed Ocaml on my cygwin machine but simple compiles fail. Permissions are fine as you can see by the interaction below. OCAMLLIB is right; What is wrong?

$ 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

回答1:


A possible solution is to run this command in cygwin:

export OCAMLLIB=C:\\OCaml\\lib

The clue came from this message thread.



来源:https://stackoverflow.com/questions/15712618/why-cant-pervasives-cmi-be-opened

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!