OCAMLMKTOP(1) General Commands Manual OCAMLMKTOP(1)

# [NAME](#NAME)

ocamlmktop - Building custom toplevel systems

# [SYNOPSIS](#SYNOPSIS)

**ocamlmktop** \[ **-v**|**-version**|**-vnum** ] \[ **-cclib libname** ] \[ **-ccopt option** ] \[ **-custom** ] \[ **-o exec-file** ] \[ **-I lib-dir** ] *filename ...*

# [DESCRIPTION](#DESCRIPTION)

The [**ocamlmktop**(1)](/man/os/ocaml/ocamlmktop.1) command builds OCaml toplevels that contain user code preloaded at start-up. The [**ocamlmktop**(1)](/man/os/ocaml/ocamlmktop.1) command takes as argument a set of *x*.cmo and *x*.cma files, and links them with the object files that implement the OCaml toplevel. If the **-custom** flag is given, C object files and libraries (.o and .a files) can also be given on the command line and are linked in the resulting toplevel.

# [OPTIONS](#OPTIONS)

The following command-line options are recognized by [**ocamlmktop**(1)](/man/os/ocaml/ocamlmktop.1).

[**-v**](#v)

Print the version string of the compiler and exit.

[**-vnum** or **-version**](#vnum)

Print the version number of the compiler in short form and exit.

[**-cclib -llibname**](#cclib)

Pass the **-llibname** option to the C linker when linking in \`\`custom runtime'' mode (see the corresponding option for [**ocamlc**(1)](/man/os/ocaml/ocamlc.1).

[**-ccopt**](#ccopt)

Pass the given option to the C compiler and linker, when linking in \`\`custom runtime'' mode. See the corresponding option for [**ocamlc**(1)](/man/os/ocaml/ocamlc.1).

[**-custom**](#custom)

Link in \`\`custom runtime'' mode. See the corresponding option for [**ocamlc**(1)](/man/os/ocaml/ocamlc.1).

[**-I directory**](#I)

Add the given directory to the list of directories searched for compiled interface files (.cmo and .cma).

[**-o exec-file**](#o)

Specify the name of the toplevel file produced by the linker. The default is **a.out**.

# [SEE ALSO](#SEE_ALSO)

[**ocamlc**(1)](/man/os/ocaml/ocamlc.1).

---

Document: ocamlmktop(1) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
