Tutorial by Examples

If your project depends on the external libraries, you should first install them with opam. Assuming your dependencies are foo and bar and the main entry point of your project is foobar.ml you can then build a bytecode executable with ocamlbuild -use-ocamlfind -pkgs 'foo,bar' foobar.byte Warnin...
If your project has no external dependency and has foo.ml as its main entry point, you can compile a bytecode version with ocamlbuild foo.byte To get a native executable, run ocamlbuild foo.native

Page 1 of 1