System Grab Bag

View all TLDR pages from common (or from all pages)

ocamlfind

The findlib package manager for OCaml. Simplifies linking executables with external libraries. More information: http://projects.camlcity.org/projects/findlib.html.
  • Compile a source file to a native binary and link with packages:
    ocamlfind ocamlopt -package {{package1}},{{package2}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}
  • Compile a source file to a bytecode binary and link with packages:
    ocamlfind ocamlc -package {{package1}},{{package2}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}
  • Cross-compile for a different platform:
    ocamlfind -toolchain {{cross-toolchain}} ocamlopt -o {{path/to/executable}} {{path/to/source.ml}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.