Last active
November 17, 2020 18:19
-
-
Save Pirgosth/176104e18b6d026626c2dc62eccd836d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Short guide on how to install Ocaml on Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install Ocaml on Windows ?
Install required files
First, you'll need to dowload and run the installer that can be find right here:
Follow installer instructions, and keep installation path in mind.
Installation can take a while, as it need to download all dependencies (Install take at least 1,84Go, so be sure to have enough free space).
Add install path to PATH
Now you'll have to add Ocaml installation path in Windows PATH, to make it available anywhere.
To do this, you'll need to search for Environnement Variables settings, and go into Environnement variables tab.
This menu must appear:

Now you'll need to add two variables: simply click new, and put:
%Your_Install_Path%\home\%Your_User_Name%\.opam\ocaml-variants.4.08.0+mingw64c\lib\ocaml
as valueFor Exemple mine is
C:\OCaml64\home\Pierre\.opam\ocaml-variants.4.08.0+mingw64c\lib\ocaml
%Your_Install_Path%\home\%Your_User_Name%\.opam\ocaml-variants.4.08.0+mingw64c\bin
Once you finished, simply confirm changes by clicking OK, you're done with Environnement variables.
You must now be able to run Ocaml by typing ocaml in a cmd shell and see it working:
Make Sublim Text 3 working with Ocaml
You just need to add a new build system, in
Tools>Build system>New Build System
.It will create a new file like this:
And replace its content with the following:
Finally, push ctrl-S and create a new folder called Snippets, and save your new build system into it, as

Ocaml.sublime-build
You can now execute Ocaml code within Sublim Text just by pressing ctrl-B.