Lamebro1
Lamebro1

Reputation: 57

Ocaml Manual installation vs Graphical installation

i'm a CS student and was recently told to install Ocaml and I used the graphical installer to do so (as opposed to the manual method my professor advised me of) - he said that when coming to test the coursework it is marked by gitlab and that doing things differently may cause the test to not run properly. As far as I can tell ocaml is working as it should be.

Is there an issue with installing Ocaml using the graphical installer rather then manually? Thank you!

https://fdopen.github.io/opam-repository-mingw/installation/

Upvotes: 0

Views: 262

Answers (1)

Maëlan
Maëlan

Reputation: 4192

As said in the webpage you are referring to, “the installer won’t allow you to set custom options: proxy configuration, select the initial OCaml version to install, etc.” Moreover, since it creates a fresh Cygwin environment, you will not be able to add OCaml to a Cygwin environment that you had beforehand.

If you weren’t previously using Cygwin, and you are fine with the default options shipped with the graphical installer and in particular the version of OCaml, you are good to go with this installer. If you want a specific version of OCaml, or you want to install it in an existing Cygwin environment, you should use the manual method.


That said, if you are using Windows 10, instead of Cygwin you may be better off installing OCaml and friends in WSL, the Linux subsystem embedded in Windows. If you haven’t used WSL yet, you’ll have to enable and install it first. Then, simply follow the procedures for installing things on Linux Ubuntu.

What is the difference between Cygwin and WSL?

  • Cygwin does its best emulating the POSIX API on top of Windows, and requires programs to be specifically compiled against its own DLL (and sometimes, their source code needs to be slightly patched).

  • By contrast, WSL provides a true Linux kernel, that can run native Linux programs. You have access to the full Linux world, including the Ubuntu package repository. That’s just simpler and less prone to issues.

What if I want direct Windows support, without nesting an Unix-like environment?

OCaml’s support for Windows is somewhat precarious. The OCaml official distribution can be built from source to get a native Windows program, but support for Windows from any other tool or library in the OCaml ecosystem is not granted. The majority of the community is using Unix-like environments.

Upvotes: 2

Related Questions