nhc.ml と test.ml という 2 つの OCaml モジュールがあります。これらのモジュールは両方とも、parser.mly、scanner.mll、ast.mli を参照します。
目標は、まだ test.ml の関数を参照できる nhc.native という 1 つの実行可能ファイルを用意することです。
./nhc.native fun_from_test
2 つのモジュールを別々に分離すると、次のように機能します。
corebuild nhc.native
corebuild test.native
しかし、次のように corebuild を使用して 2 つをリンクしようとすると:
corebuild nhc.native -mod test
エラーが発生します:
Error: No implementations provided for the following modules:
Scanner referenced from test.cmx
Parser referenced from test.cmx
最初にテスト実行可能ファイル (test.native) を mkaing せずに同じコマンドを実行すると、次のエラーが発生します。
File "_none_", line 1:
Error: Cannot find file test.cmx
指定された機能を取得するにはどうすればよいですか?