ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
360 stars 79 forks source link

Can't run Ocaml REPL #277

Closed Nolord closed 2 years ago

Nolord commented 2 years ago

I installed the last version of emacs on my PC running on Windows 10, and iinstalled Tuareg via NonGNU ELPA. When I try to run OCaml REPL (C-c C-s), while in a .ml file, it puts this in my minibuf:

OCaml REPL to run : ocaml -nopromptcont

If I RET i get this message in the minibuf:

Searching for program: No such file or directory, ocaml

Now if I remove the "ocaml -nopromptcont", and then RET with only:

OCaml REPL to run :

I get a blank buffer named OCaml. But if I evalutae my code (C-c C-b), it tells me in the minibuf:

Output file descriptor of OCaml is closed

I'm a beginner with emacs and ocaml. I really do wanna install everything on Windows 10, no virtual machine shenanigans. Everything could be easier with opam, but it isn't available on Windows yet.

Chris00 commented 2 years ago

That means the program ocaml is not in your path — or that path is not known to Emacs. Add the directory where ocaml is to your path.

Nolord commented 2 years ago

I can't find it, I have OCaml 4.08.1 installed for sure but I installed it with Ubuntu. I don't know what directory to put since I can't find the ocaml.exe .

Chris00 commented 2 years ago
  1. You should install a newer version of OCaml.
  2. You should ask on discourse for help — I'm not using Windows so I can hardly help you if you do not have minimal skills.