我有一个函数来获取当前时间使用unix gettimeofday()函数time.ml。该文件访问功能以下列方式:在OCaml中使用Unix函数源
open Unix; (*declared at the top of the file*)
let get_time() = Unix.gettimeofday()
在.mli文件中的相应条目是这样的:
File "_none_", line 1, characters 0-1:
No implementations provided for the following modules:
Unix referenced from time.cmx
:
val get_time : unit -> float
但编译它们抛出一个错误时
我已检查以下文件是否存在于/lib/ocaml目录中:
unix.cmi, unix.a unix.cma unix.cmx unix.cmxa unix.cmxs unix.mli
和路径设置正确设置为的.bashrc文件。
LD_LIBRARY_PATH=~/lib
其他功能,如fprintf中从printf的模块正常工作inspite在同一/LIB/ocaml的目录之中。
任何想法可能是错的?我做错了什么,或者我错过了什么?
做到了!谢谢! –