0
我有两个OCaml模块,即nhc.ml和test.ml.这两个模块都引用parser.mly,scanner.mll和ast.mli。如何链接两个自定义OCaml模块与`corebuild`
目标是有一个可执行文件,即nhc.native,我仍然可以引用test.ml的功能。
./nhc.native fun_from_test
分隔两个模块单独工作:
corebuild nhc.native
corebuild test.native
但是当我尝试使用corebuild两个链接如下:
corebuild nhc.native -mod test
我得到的错误:
Error: No implementations provided for the following modules:
Scanner referenced from test.cmx
Parser referenced from test.cmx
如果我运行相同的命令,而无需首先mkaing测试可执行文件(test.native),我收到以下错误:
File "_none_", line 1:
Error: Cannot find file test.cmx
我怎样才能获得指定的功能?