This installer is out of date

This installer no longer works. Do not use it. Here's some suggestions:

  • Andreas Hauptmann's installer is very solid and does a great job of doing what this installer once did. It also gives you a working OPAM, thanks to Andreas' excellent work in patching every single package in existence to work on Windows.
    What you're getting is a custom (old) OPAM that was patched by Andreas, his diff is at
  • Official OPAM 2.0 Windows Beta by Cambridge Labs. Coming up soon, hopefully.


There are several ways to compile and distribute OCaml on Windows. This installer distributes the native, mingw-w64, 64-bit port of OCaml along with a native, 64-bit OPAM. The installer offers to install Cygwin so that you get 1) the proper compiler toolchain needed to use ocamlopt and 2) Unix tools such as make, bash and others, which most packages depend on.


Getting everything to work right can be tricky. Please follow the instructions on the wiki before even downloading the installer!


The installer has been tested on Windows XP, Windows 7, Windows 8. Have you run the sanity checks from the instructions on the wiki? In that case you may proceed.

Installer for 64-bit OCaml 4.02.3 + OPAM

Other versions

The full story

See my entry on the Gagallium blog for the (outdated) details.

  • The compiler binaries (ocamlc, ocamlopt, etc.) are compiled with x86_64-mingw64: they are native windows programs.
  • ocamlopt generates native windows programs: ocamlopt depends on x86_64-mingw64.
  • Cygwin is used as a development environment, because it packages mingw (needed for ocamlopt to work properly), as (needed for ocamlopt) and other Unix tools required by ocamlbuild and others.
  • opam for Windows comes from David Allsop's fork; it has been patched by yours truly in order to, among other things, point to Andreas Hauptmann's OPAM repository by default.
  • Andreas' repository contains patched packages (so that more of them build on Windows); it also contains depext-cygwinports, an OPAM plugin that is capable of fetching system dependencies as cygwin packages for the x86_64-mingw64 toolchain. Concrete example: opam depext ssl will call into Cygwinports to make sure that openssl gets installed into your Cygwin setup for the right toolchain.

Known issues

  • Most antivirus software will flag the OCaml installer as being a virus, because OCaml is using NSIS (see the NSIS website). There is a discussion in issue 17 on the bugtracker; the last comment provides indications for reporting the installer as a false positive. Please do.


The installer picture is from Flick © Neil and Kathy Carey. The installer uses NSIS which has its own license. The installer also uses NSISunz which was originally written by Saivert.

Bugs, patches

The project lives on GitHub. Please file any bug in the "Issues" section there.

The README there should contain enough information to get you (roughly) started if you want to repackage the installer yourself.