I have a function to get the current time using unix gettimeofday () in the time.ml function. The file accesses the function as follows:
open Unix; (*declared at the top of the file*) let get_time () = Unix.gettimeofday ()
The corresponding entry in the .mli file is as follows:
val get_time : unit -> float
But when compiling, they cause an error:
File "_none_", line 1, characters 0-1: No implementations provided for the following modules: Unix referenced from time.cmx
I checked that the following files are present in the / lib / ocaml directory:
unix.cmi, unix.a unix.cma unix.cmx unix.cmxa unix.cmxs unix.mli
and the path is correctly set to the .bashrc file.
LD_LIBRARY_PATH=~/lib
Other functions, such as fprintf from the Printf module, work correctly when located in the same / lib / ocaml directory.
Any ideas what could be wrong? Am I doing something wrong, or is something missing?
source share