I used to be able to compile programs using Big_int with the command:
$ ocamlopt -o test.opt nums.cmxa test.ml
and not worry about the library version, but now I’ve upgraded to 14.4.1 (with opam switch create ocaml.4.14.1; opam switch ocaml.4.14.1; opam install zarith) when I try to compile a program using Zarith (which replaced Num and Big_int) using
$ ocamlopt -o test.opt zarith.cmxa test.ml
I get an ‘Unbound module Z’ error. I now have to use ocamlfind or give a specific versioned path:
$ ocamlopt.opt -o test.opt -I /home/user/.opam/ocaml.4.14.1/lib/zarith zarith.cmxa test.ml
I’ve rerun eval $(opam config env) but no change. My environmental variables look OK:
CAML_LD_LIBRARY_PATH=/home/user/.opam/ocaml.4.14.1/lib/stublibs:/home/user/.opam/ocaml.4.14.1/lib/ocaml/stublibs:/home/user/.opam/ocaml.4.14.1/lib/ocaml
OCAML_TOPLEVEL_PATH=/home/user/.opam/ocaml.4.14.1/lib/toplevel
OPAM_SWITCH_PREFIX=/home/user/.opam/ocaml.4.14.1
PATH=/home/user/.opam/ocaml.4.14.1/bin: […]
How can I restore the previous behavior?