Previously, I have been using the Bash shell on Windows 10 for Ocaml development. Since the Linux subsystem for Windows does not currently support a graphical interface, it was necessary for me to find a different solution if I wanted to use an IDE for Ocaml programming. The best IDE that I am aware of that supports Ocaml development is Eclipse, via the OcaIDE plugin. Here, I will try to provide step-by-step instructions on the process I used and the software that I installed.
First, I had to install Cygwin. The installer can be found here. The minimum packages to install are:
Devel -> make
Devel -> ocaml-camlp4
Ocaml -> ocaml
The Cygwin installer will automatically install any required dependencies. Next, ensure that the newest JRE is installed. The Java Runtime Environment can be downloaded here. At the time of this writing, the newest version of the JRE is 8u102.
Once the Java Runtime Environment is installed, you can install Eclipse. Eclipse can be downloaded here. You can install whichever development environment you want, I chose C/C++.
Now that the IDE is installed, we can install the OcaIDE plugin. To install the plugin, open Eclipse and choose
Install New Software... from the
Work with: box, enter the address
http://www.algo-prog.info/ocaide/, and click
Add.... Select the
OcaIDE package, and click
Next to install. The package is unsigned, so you will need to allow it to install. Once the plugin is installed, Eclipse will need to restart.
The last step is to configure the newly installed OcaIDE plugin. If everything was installed correctly, you should be able to enter the paths from Cygwin as shown in the picture.
The last step is to make sure to add the Cygwin folder to your
%PATH% environment variable. Open a new command prompt, and type the following:
You should now have a working Eclipse installation with the OcaIDE that you can use for Ocaml development. More information about the OcaIDE plugin can be found here.