OCaml
Installation notes for MS-Windows
Base software
Since Windows comes with no development environment, there are quite a few packages to install.
- OCaml: the toplevel and compilers. To have an entirely free framework, download the MinGW port.
- Tck/Tk 8.4: not strictly needed but allows to
run
ocamlbrowser
, so it is recommended. - flexdll is indispensable to compile programs to native code and to link to C libraries.
- MinGW [use the
“Download
Now!” button] and
the MSYS
Base System provide essential tools compile C code and to
drive build processes. During the installation MinGW,
select
g++
during installation. Note that, in order to finddllcrt2.dll
, one must add-Lc:/MinGW/lib
to various commands. - findlib: simplify and make more portable the compilation
of libraries and programs thanks to the
ocamlfind
utility. Download the tarball or get the development version withbzr branch https://godirepo.camlcity.org/svn/lib-findlib/trunk/ findlib
./configure
” followed by “make all opt
”, and finally install it with “make install
”.
Editor
Whichever editor you use, you should configure it so it adheres to the OCaml's programming guidelines.
- Emacs is a very powerful editor that is well worth to learn. For OCaml, use the tuareg mode. If you were told Emacs lacks features that modern IDE have, check Emacs For Dev Studio Users.
- For Vim, you can use the excellent configuration files by Markus Mottl.
- If you like Eclipse (which is heavy but popular these days), we recommend the plugin OcaIDE.
- For NEdit use the patterns written by Nathaniel Gray. Be aware however that NEdit does not support uft-8 and relies on the aging Motif toolkit.
- For Kate, use the plugin by Matteo Franchin.
Additional software
-
Perl Compatible Regular Expressions
(pcre). You must first download the C library
and compile it with the usual
“
./configure
”, “make
”, “make install
”. Then get pcre-ocaml, change theMakefile.conf
so it readsexport INCDIRS := c:/msys/1.0/local/include/ export LIBDIRS := c:/msys/1.0/local/lib/pkgconfig/ c:/MinGW/lib
compile with “make
”, and finally do “make install
”.