OS Manuals

/usr/bin/ocamlmklib

The core OCaml system: compilers, runtime system, base libraries

From ocaml 5.5.2-r0 (os), captured 2026-11-05 by running ocamlmklib --help (exit 0). permalink

Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.ml|.mli|.o|.a|.obj|.lib|
                             .dll|.dylib files>
Options are:
  -args <file>   Read additional newline-terminated command line arguments
                 from <file>
  -args0 <file>  Read additional null character terminated command line
                 arguments from <file>
  -cclib <lib>   C library passed to ocamlc -a or ocamlopt -a only
  -ccopt <opt>   C option passed to ocamlc -a or ocamlopt -a only
  -custom        Disable dynamic loading
  -g             Build with debug information
  -dllpath <dir> Add <dir> to the run-time search path for DLLs
  -F<dir>        Specify a framework directory (MacOSX)
  -framework <name>    Use framework <name> (MacOSX)
  -help          Print this help message and exit
  --help         Same as -help
  -h             Same as -help
  -I <dir>       Add <dir> to the path searched for OCaml object files
  -failsafe      fall back to static linking if DLL construction failed
  -ldopt <opt>   C option passed to the shared linker only
  -linkall       Build OCaml archive with link-all behavior
  -l<lib>        Specify a dependent C library
  -L<dir>        Add <dir> to the path searched for C libraries
  -ocamlc <cmd>  Use <cmd> in place of "ocamlc"
  -ocamlcflags <opt>    Pass <opt> to ocamlc
  -ocamlopt <cmd> Use <cmd> in place of "ocamlopt"
  -ocamloptflags <opt>  Pass <opt> to ocamlopt
  -o <name>      Generated OCaml library is named <name>.cma or <name>.cmxa
  -oc <name>     Generated C library is named dll<name>.so or lib<name>.a
  -rpath <dir>   Same as -dllpath <dir>
  -R<dir>        Same as -rpath
  -suffixed      Append runtime ID to any generated shared libraries
  -no-suffixed   Do not append runtime ID to any generated shared libraries
                 (default)
  -verbose       Print commands before executing them
  -v             same as -verbose
  -version       Print version and exit
  -vnum          Print version number and exit
  -Wl,-rpath,<dir>     Same as -dllpath <dir>
  -Wl,-rpath -Wl,<dir> Same as -dllpath <dir>
  -Wl,-R<dir>          Same as -dllpath <dir>
Options (30)
OptionDescriptionSource
-args fileRead additional newline-terminated command line arguments from <file>help
-args0 fileRead additional null character terminated command line arguments from <file>help
-cclib libC library passed to ocamlc -a or ocamlopt -a onlyhelp
-ccopt optC option passed to ocamlc -a or ocamlopt -a onlyhelp
-customDisable dynamic loadinghelp
-gBuild with debug informationhelp
-F dirSpecify a framework directory (MacOSX)help
-framework nameUse framework <name> (MacOSX)help
-helpPrint this help message and exithelp
--helpSame as -helphelp
-hSame as -helphelp
-I dirAdd <dir> to the path searched for OCaml object fileshelp
-failsafefall back to static linking if DLL construction failedhelp
-ldopt optC option passed to the shared linker onlyhelp
-linkallBuild OCaml archive with link-all behaviorhelp
-l libSpecify a dependent C libraryhelp
-L dirAdd <dir> to the path searched for C librarieshelp
-ocamlc cmdUse <cmd> in place of "ocamlc"help
-ocamlcflags optPass <opt> to ocamlchelp
-ocamloptflags optPass <opt> to ocamlopthelp
-o nameGenerated OCaml library is named <name>.cma or <name>.cmxahelp
-oc nameGenerated C library is named dll<name>.so or lib<name>.ahelp
-rpath dirSame as -dllpath <dir>help
-R dirSame as -rpathhelp
-suffixedAppend runtime ID to any generated shared librarieshelp
-no-suffixedDo not append runtime ID to any generated shared libraries (default)help
-verbosePrint commands before executing themhelp
-vsame as -verbosehelp
-versionPrint version and exithelp
-vnumPrint version number and exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.