ocamlmktop(1)

ocamlmktop1

Building custom toplevel systems

Usage

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

Overview

The ocamlmktop(1) command builds OCaml toplevels that contain user code preloaded at start-up. The 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

The following command-line options are recognized by ocamlmktop(1).

-v

Print the version string of the compiler and exit.

-vnum or -version

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

-cclib -llibname

Pass the -llibname option to the C linker when linking in ``custom runtime'' mode (see the corresponding option for ocamlc(1).

-ccopt

Pass the given option to the C compiler and linker, when linking in ``custom runtime'' mode. See the corresponding option for ocamlc(1).

-custom

Link in ``custom runtime'' mode. See the corresponding option for ocamlc(1).

-I directory

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

-o exec-file

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

Releases

14 releases since Debian 2.2 (Potato); the text changed 6 times.

  1. 2.2–5.0
  2. 6.0
  3. 7
  4. 8–9
  5. 10–12
  6. 13
  7. Arch

-version since Debian 8 (Jessie); -vnum since Debian 8 (Jessie).

-I until Debian 5.0 (Lenny); -vnumor-version until Debian 7 (Wheezy).

From ocaml 5.5.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.