I need to convert a simple OCaml file into JAR file so that I can run atop JVM platform.
This OCaml file needs to use the Big_int module. There is this line of code
open Big_int
But it always returns me this line of error Error: Reference to undefined global
Big_int'` when I try to run ocamljava to convert it into jar file.
ocamljava -o myprog.jar source.ml
I am able to see big_int.cmi
, big_int.cmj
, big_int.cmx
, big_int.mli
, nums.cma
, nums.cmja
, etc on this directory /Users/myname/.opam/ocamljava-2.0-alpha2/lib/ocaml
. I know that the Big_int is residing inside these libraries; but I don't know how to link them into compilation.
By the way, I'm using OCamlJava 2.0.