0
votes

I started programming with Ocaml few days ago. I use eclipse OcaIDE, ubuntu.

When I try to use the Core module in a code : open Core.Std ...

I get an error: Error: Unbound module Unix

I tried to create .ocamlinit file with adds:

#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;

The same error occurs in eclipse. Сode without the use of the modules run fine.

Please, tell me, what I have to do?

Sorry for bad english. Thank You for your answers!

1
You can try to add #require "unix" as the error mentionned. - cago
.ocamlinit has no connection with OCaIDE in particular and ocaml compiler in general. So it will not help. One need to go to the project configuration in OCaIDE and add corresponding compiler flags, like -I, and enumerate the required cmxa and cma file. That's why I discourage OP from using OCaIDE, it can be used, but requires some sort of expertise in OCaml infrastructure. - ivg

1 Answers

1
votes

OCaIDE is not wide-spread in OCaml community, so it is not well supported. Try to use emacs or vim. If you insist on using OCaIDE, then a good place to start is to view tutorials.

P.S. Even if you manage to configure OCaIDE it will be still much worse than Emacs+Merlin.