为什么无法打开pervasives.cmi? [英] Why can't pervasives.cmi be opened?

查看:97
本文介绍了为什么无法打开pervasives.cmi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的cygwin机器上安装了Ocaml,但简单的编译失败.如下面的交互所示,权限很好. OCAMLLIB是正确的;怎么了?

$ 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

解决方案

可能的解决方案是在cygwin中运行以下命令:

export OCAMLLIB=C:\\OCaml\\lib

线索来自此消息线程. /p>

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

解决方案

A possible solution is to run this command in cygwin:

export OCAMLLIB=C:\\OCaml\\lib

The clue came from this message thread.

这篇关于为什么无法打开pervasives.cmi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆