1 This is the Fedora MinGW project's OCaml cross-compiler.
3 For more about the Fedora MinGW project see:
4 https://fedoraproject.org/wiki/MinGW
6 For more about OCaml see:
9 This is a native Fedora compiler which generates Windows executables.
10 Along with the other mingw32-ocaml-* packages (libraries) you can
11 cross-compile complicated OCaml software, including GUI apps, to
14 Integration with autotools, autoconf
15 ----------------------------------------------------------------------
17 The compiler is called 'i686-pc-mingw32-ocamlopt' (along with a few
18 other tools prefixed with i686-pc-mingw32-*). Because the compiler is
19 a native Fedora binary, it is installed in /usr/bin.
21 The name was deliberately chosen to fit with the convention used by
22 autoconf so that you can write:
24 AC_CHECK_TOOL( ...[ocamlopt]... )
26 Autoconf knows when cross-compiling to search for $target-tool, so the
27 above will look for i686-pc-mingw32-ocamlopt when cross-compiling.
29 Integration with ocamlfind, findlib
30 ----------------------------------------------------------------------
32 To support parallel installations of the OCaml compiler and library,
33 we switch based on the ocamlfind configuration file.
35 Thus, to choose the cross-compiler, simply set this environment
36 variable (and export it):
38 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
40 After doing this, commands such as:
46 will automatically choose the cross-compiler and the correct cross-
47 compiled libraries. For example:
49 ocamlfind ocamlopt -package extlib -linkpkg test.ml -o test.exe
51 will produce a cross-compiled Windows binary using the extlib library.