namespaces
namespaces copied to clipboard
Problem with example 3-library
Inside the test/3-library directory, I enter the command make
. Then in another folder, I create a file test.ml containing
open Lib_1
let v = Printf.printf "%d\n" Namespace.Foo.v
that I compile with the following command:
ocamlbuild -pkg namespaces-lib-test test.native
give me the following error:
+ /home/fthire/.opam/4.04.0/bin/ocamlopt.opt -I /home/fthire/.opam/4.04.0/lib/namespaces-lib-test test.cmx -o test.native
File "_none_", line 1:
Error: No implementations provided for the following modules:
Lib_1__namespace referenced from test.cmx
Lib_1 referenced from test.cmx
Lib_1__Namespace__foo referenced from test.cmx
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
as the working directory does not look like an ocamlbuild project (no
'_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
you should add the option "-r" or create an empty '_tags' file.
To enable recursive traversal for some subdirectories only, you can use the
following '_tags' file:
true: -traverse
<dir1> or <dir2>: traverse
However, compiling the example 4-oasis-library and compiling my example with it:
ocamlbuild -pkg namespaces-oasis-lib-test test.native
works. So I don't figure out where is the problem.
Thanks for the report. Namespaces is a dormant project at this point. I don't have time to work on it, and I can't recommend using it. If you would like to fix this anyway, I can merge a PR. See this comment on the project status. I've added a warning to the README
as well.