mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-18 17:01:17 +00:00
Update cheatsheets
This commit is contained in:
22
ocamlfind
Normal file
22
ocamlfind
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
Reference in New Issue
Block a user