I have a library that calls C code. It’s compile with the -custom, -cclib, -l flags, which is working ok when I compile my code against the library with ocamlc,
but when I use the “ocaml” top level to run a script like:
ocaml -I /opt/godi/lib/ocaml/pkg-lib/xxxx xxx.cma myprog.ml
it says:
Error: The external function `caml_yyyy' is not available
Do I need additional parameters to tell the top level ?
You should build your own toplevel using “ocamlmktop”:
Then, you can use it :
Note that you still need the -I so that the toplevel can find the interface files of the library that it contains.