Let s say we have two files a.ml and b.ml in a “src” directory. With stupid code inside just for the test.
let a = "filea"
open A
let b = "fileb"
Then I compile the files with these commands
ocamlc -c src/a.ml src/b.ml
I got Error: Unbound module A
Of course it works if I enter in src directory and remove “src” in commands.
Dune is able to put files in complicated directory structure so I guess I can do that with the simple commands, but I don’t know how.