OCAMLC(1) General Commands Manual OCAMLC(1) (NAME) ocamlc - OCaml (SYNOPSIS) ocamlc [] filename... ocamlc.opt [] filename... (DESCRIPTION) OCaml ocamlc(1) OCaml . ocamlrun(1) . ocamlc(1) C . : o .mli . : . x.mli ocamlc(1) x.cmi . o .ml . . x.ml ocamlc(1) x.cmo . x.mli x.ml x.cmi ( ) . x.mli x.ml x.cmo x.cmi . x.cmi x.ml . o .cmo . .ml ( ) OCaml . .cmo .ml : . x.cmo .cmo x . o .cma . ( .cmo) . ocamlc -a ( -a ). .cmo ( ) .cma . . o .c C .o . -custom ( -custom ). o .o .a C . -custom ( -custom ) C . o .so C (DLL) . C OCaml . ocamlrun(1) . OCaml ocamlrun(1) . caml.out ocamlrun caml.out arg1 arg2 ... argn caml.out arg1 argn . ( ocamlrun(1) .) : ./caml.out arg1 arg2 ... argn. . : ocamlc.byte ( ocamlc(1) ) ocamlc.opt ( ocamlopt(1) ). ocamlc.opt OCaml . ocamlc ocamlc.opt ocamlc.byte. (OPTIONS) ocamlc(1) . -a ( .cma) ( .cmo) . -o . -custom -cclib -ccopt .cma . -custom -cclib -ccopt -noautolink . $CAMLORIGIN -ccopt .cma . -absname . -no-absname . -annot 4.11 . -bin-annot . -bin-annot ( ) . src.ml src.cmt . . -bin-annot -annot . -c . . . . -cc ccomp ccomp C " " ( -custom ) C .c. -cclib -llibname -llibname C " " ( -custom ). C . -ccopt option option C " " ( -custom ). -ccopt -Ldir C dir C . -color mode ( ). : auto ( tty ANSI) always never . -color "OCAML_COLOR" . auto/always/never . -color "OCAML_COLOR" "NO_COLOR" . auto "TERM" "dumb" isatty(stderr) . -error-style mode . : short contextual "short" . contextual . -error-style "OCAML_ERROR_STYLE" . short/contextual . -compat-32 . . -config ocamlc(1) . -config-var -config . . -custom " " (custom runtime). ocamlrun(1) . . ocamlrun(1) . " " OCaml C . strip(1) ocamlc -custom . : "setuid" "setgid" ocamlc -custom . -depend ocamldep-args ocamldep(1) . -dllib -llibname C dlllibname.so ocamlrun(1) . -dllib-suffixed -llibname -dllib ocamlrun(1) (mangle) . C ocamlmklib -suffixed . -dllpath dir dir C. ( -I ) . -dllpath dir ocamlrun(1) . -for-pack module-path ( .cmo) ( ) -pack . ocamlc -for-pack P -c A.ml a.cmo ocamlc -pack -o P.cmo a.cmo . : -for-pack . -g . ocamldebug(1) (backtrace) . -no-g (). -i ( .ml) ( ) . ( .cmo .cmi) . . ( .mli) : .mli . -i-variance . ( ) . -cmi-file filename ( .mli .cmi ). -I directory (.cmi) (.cmo) (.cma) C -cclib -lxxx. . -I . -nostdlib . + . -I +compiler-libs compiler-libs . -impl filename filename .ml . -intf filename filename .mli . -intf-suffix string string ( .mli ). -keep-docs .cmi . -keep-locs .cmi . -keywords version+list version+list. + . OCaml . . -labels . . -nolabels . -launch-method method . : exe runtime-launch-info . sh #! . #! sh PATH . /path/interpreter sh #! sh PATH /path/interpreter . -linkall . . ( -a) -linkall . ( -c) -linkall . -make-runtime ( -o) C . ocamlc -use-runtime runtime-name . -match-context-rows number . . . -no-alias-deps . -no-app-funct (applicative) . . -noassert assertion. assert false . . -noautolink .cma -custom -cclib -ccopt ( ). C C -noautolink C . -nolabels . . -labels . -nostdlib (.cmi) (.cmo) (.cma) C -cclib -lxxx. -I . -o filename ( -c) ( -a) ( -pack) C ( -output-obj -output-complete-obj ). a.out camlprog.exe . ( -c ) cmi cmo filename . -opaque . .cmx -- . . -open module . -open open! module1;; ... open! moduleN;; . -output-obj C . OCaml C C . -o . C ( .c) / ( .so) . -output-complete-obj -output-obj . -pack ( .cmo) (.cmi) .cmo . .cmo -o . ocamlc -pack -o p.cmo a.cmo b.cmo c.cmo p.cmo p.cmi A B C a.cmo b.cmo c.cmo. P.A P.B P.C . .cmo -for-pack . a.cmo b.cmo c.cmo ocamlc -for-pack P . -pp command command . command . . -ppx command command . Ast_mapper(3) . -principal . / ( ) . -principal . -no-principal . . -rectypes . . . -no-rectypes . . -runtime-search method . : disable . fallback PATH . enable PATH . . -runtime-variant suffix suffix . OCaml ( d ) ( i ) . -safe-string string bytes . . -safer-matching . . GADT . -set-runtime-default setting=value . : standard_library_default . . -short-paths . -stop-after pass . : parsing typing. -strict-sequence unit . -no-strict-sequence unit . . -unboxed-types (unboxable) ( ) [@@ocaml.boxed] . -no-unboxed-types [@@ocaml.unboxed] . . -unsafe ( v.(i) s.[i] ). -unsafe : . -unsafe-string string bytes . . -use-runtime runtime-name runtime-name ocamlc -make-runtime runtime-name . -v . -verbose C -custom . C . -vnum -version ( "3.11.0") . -w warning-list warning-list. . ( ). . . warning-list . : +name name. -name name. @name name. : +num num. -num num. @num num. +num1..num2 num1 num2 ( ). -num1..num2 num1 num2 ( ). @num1..num2 num1 num2 ( ). +letter letter. . -letter letter. . @letter letter. . uppercase-letter uppercase-letter. lowercase-letter lowercase-letter. : 1 [comment-start] . 2 [comment-not-end] . 3 . 4 [fragile-match] : . 5 [ignored-partial-application] : . 6 [labels-omitted] . 7 [method-override] "method!". 8 [partial-match] : . 9 [missing-record-field-pattern] . 10 [non-unit-statement] unit ( ). 11 [redundant-case] ( ). 12 [redundant-subpat] . 13 [instance-variable-override] . 14 [illegal-backslash] . 15 [implicit-public-methods] . 16 [unerasable-optional-argument] . 17 [undeclared-virtual-method] . 18 [not-principal] ( principal). 19 [non-principal-labels] . 20 [ignored-extra-argument] . 21 [nonreturning-statement] . 22 [preprocessor] . 23 [useless-record-with] with . 24 [bad-module-name] : OCaml . 25 : . 26 [unused-var] : let as , (_) . 27 [unused-var-strict] : let as , (_) . 28 [wildcard-arg-to-constant-constr] (_) . 29 [eol-in-string] . . 30 [duplicate-definitions] . 31 [module-linked-twice] . 32 [unused-value-declaration] . 33 [unused-open] open . 34 [unused-type-declaration] . 35 [unused-for-index] for . 36 [unused-ancestor] . 37 [unused-constructor] . 38 [unused-extension] . 39 [unused-rec-flag] rec . 40 [name-out-of-scope] . 41 [ambiguous-name] . 42 [disambiguated-name] . 43 [nonoptional-label] . 44 [open-shadow-identifier] open . 45 [open-shadow-label-constructor] open . 46 [bad-env-variable] . 47 [attribute-payload] (attribute payload) . 48 [eliminated-optional-arguments] . 49 [no-cmi-file] cmi . 50 [unexpected-docstring] . 51 [wrong-tailcall-expectation] @tailcall. 52 [fragile-literal-pattern] . 53 [misplaced-attribute] . 54 [duplicated-attribute] . 55 [inlining-impossible] . 56 [unreachable-case] ( ). 57 [ambiguous-var-in-pattern-guard] or . 58 [no-cmx-file] cmx . 59 [flambda-assignment-to-non-mutable-value] . 60 [unused-module] . 61 [unboxable-type-in-prim-decl] (primitive). 62 [constraint-on-gadt] GADT. 63 [erroneous-printed-signature] . 64 [unsafe-array-syntax-without-parsing] -unsafe . 65 [redefining-unit] '()' . 66 [unused-open-bang] open! . 67 [unused-functor-parameter] . 68 [match-on-mutable-state-prevent-uncurry] uncurry . 69 [unused-field] . 70 [missing-mli] . 71 [unused-tmc-attribute] @tail_mod_cons . 72 [tmc-breaks-tailcall] @tail_mod_cons . 73 [generative-application-expects-unit] () (struct end) . . . A C 1, 2 D 3 E 4 F 5 K 32, 33, 34, 35, 36, 37, 38, 39 L 6 M 7 P 8 R 9 S 10 U 11, 12 V 13 X 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 30 Y 26 Z 27 -w +a-4-7-9-27-29-30-32..42-44-45-48-50-60-66..70-74. 5 10 . -warn-error warning-list warning-list . . warning-list -w : + ( ) - ( ) @ . : -warn-error OCaml . -warn-error -a ( ). -warn-help . -where . -with-runtime . . -without-runtime ( ) . - file file (-) . -help --help . (SEE ALSO) ocamlopt(1), ocamlrun(1), ocaml(1). The OCaml user's manual, "Batch compilation". OCAMLC(1)