Search code examples
modulecygwinocamlocamlbuildocaml-batteries

Cygwin & OCaml: OPAM + Batteries


I extensively use Cygwin on a Windows 8 environment (I do not want to go ahead and boot/load Linux directly on the machine). I use the OCamlIDE plug-in for Eclipse and have experienced relatively no problems using this workflow setup.

However, I would like to use Batteries so that I may make use of use of its dynamic arrays among a few other interesting features that will speed up my development process.

I have tried this method: http://ocaml.org/install.html, but I get the following error:

$ sh ./opam_installer.sh /usr/local/bin
No file yet for i686:CYGWIN_NT-6.2-WOW64

What am I missing and how would I configure Cygwin so that it can accept the Opam installer? When I tried yet a different way of building Opam, I got:

'i686-w64-mingw32-gcc' is not recognized as an internal or external command,

as a Makefile error and reason for building failure. It seems something is wrong related to mingw32-gcc, what do I need to install and/or configure for my Cygwin to get it to compile/build things properly. I have wget and curl installed as well.

My overall question: What is the best way to get Batteries installed on my system with the minimum of time spent tracing all of its dependencies by hand? Is there a way I can just build the library module, such as BatDynArray and the includes:

include BatEnum.Enumerable
include BatInterfaces.Mappable

That way I can just call them directly in my code with open...;; and/or include...;;;


Solution

  • OCaml works beautifully on Windows with WODI, which is a Cygwin-based distribution that includes Batteries and tons of other useful packages (which are a pain to install manually on Windows).

    I urge you to take a shot at WODI, which I believe to be an indispensable tool for the rest of us, the forgotten souls, who have to deal with Windows.