The line
open Uutf
in my file mymod.ml
is causing the error shown below:
% corebuild -quiet test.native
+ ocamlfind ocamlopt -c -w A-4-33-40-41-42-43-34-44 -strict-sequence -g -annot -bin-annot -short-paths -thread -syntax camlp4o -package bin_prot.syntax -package sexplib.syntax,comparelib.syntax,fieldslib.syntax,variantslib.syntax -package core -o mymod.cmx mymod.ml
File "mymod.ml", line 2, characters 5-9:
Error: Unbound module Uutf
I've previously installed Uutf
with
% opam install uutf
What else is one supposed to do after running the opam install
command above?
PS: I have read several SE threads on OCaml "Unbounded module" errors, including
Ocaml unbound module
Error: Unbound module ... in Ocaml
ocaml toplevel throws error unbounded module
Ocaml and Opam: unbound module Core
...but none have answered my question.
just use
corebuild -package uutf test.native
This will automatically (using ocamlfind
) find the dependend package and add all the needed flags.
You can query ocamlfind database with ocamlfind list
shell comand, to see what libraries are available. It is very handy if you're unsure about the library name.
Well, you use corebuild, i assume it's that script given the display.
You should try adding -lib uutf
in your command line so that your call to ocamlbuild knows it should link to it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.