I am new to Ocaml and trying to write some small example application. I am using ocamlc
version 3.11.2 under Linux Ubuntu 10.04. I want to compile two files:
It would be clearer if you showed the code that's not working. As Kristopher points out, though, the most likely problem is that you're not specifyig which module foo
is in. You can specify the module explicitly, as A.foo
. Or you can open A
and just use the name foo
.
For a small example it doesn't matter, but for a big project you should be careful not to use open
too freely. You want the freedom to use good names in your modules, and if you open too many of them, the good names can conflict with each other.