I have an OCaml project and I'm running into a weird issue.
The directory structure looks like this:
./tests
test.ml
templatetest.ml
./src
template.ml
...
andsoforth.ml
I am building it like this:
ocamlbuild -Is src,tests tests/test.native
Key point being, tests/test.ml depends on tests/templatetest.ml.
When I build it, I get:
+ /usr/local/bin/ocamlc.opt -c -I tests -I src -o tests/test.cmo tests/test.ml
File "tests/test.ml", line 1, characters 0-17:
Error: Unbound module TemplateTest
Command exited with code 2.
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00.
I tried adding a _tags file in the top directory containing:
<src> or <tests>: include
That still produced the same error. (I believe ocamlbuild tests/test.native with the _tags file is the exact same thing as the previous build line I used.)
I also created an empty _tags file in both ./tests and ./src, but that didn't change anything either.
Any suggestions? If you need, the entire source is here. Just run make test
. Thanks!