Files
cheatsheet-tldr/tldr/ocamlc
2025-04-26 00:18:47 +00:00

23 lines
524 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# ocamlc
> The OCaml bytecode compiler.
> Produces executables runnable by the OCaml interpreter.
> More information: <https://manned.org/ocamlc>.
- Create a binary from a source file:
`ocamlc {{path/to/source_file.ml}}`
- Create a named binary from a source file:
`ocamlc -o {{path/to/binary}} {{path/to/source_file.ml}}`
- Automatically generate a module signature (interface) file:
`ocamlc -i {{path/to/source_file.ml}}`