Closed apatil closed 7 years ago
I have a test file, test.ml:
(* test.ml *) let x = [%expr 2 + 2]
When I try to build it with ocamlbuild, I see an error:
anand@localhost> ocamlbuild -package ppx_tools -package ppx_tools.metaquot test.byte + /home/anand/.opam/4.04.0/bin/ocamlc.opt -c -I /home/anand/.opam/4.04.0/lib/ocaml/compiler-libs -I /home/anand/.opam/4.04.0/lib/ppx_tools -o test.cmo test.ml File "test.ml", line 1, characters 10-14: Error: Uninterpreted extension 'expr'. Command exited with code 2.
I have ppx_tools 5.0, ocamlbuild 0.11.0 and ocaml 4.04.0. Thanks in advance!
ocamlbuild does not use ocamlfind (-package flag) by default. Add the -use-ocamlfind flag to your ocamlbuild call and it should work.
-package
-use-ocamlfind
That worked, thank you!
I have a test file, test.ml:
When I try to build it with ocamlbuild, I see an error:
I have ppx_tools 5.0, ocamlbuild 0.11.0 and ocaml 4.04.0. Thanks in advance!