namespaces icon indicating copy to clipboard operation
namespaces copied to clipboard

Problem with example 3-library

Open francoisthire opened this issue 7 years ago • 1 comments

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.

francoisthire avatar Mar 20 '17 19:03 francoisthire