user797257
user797257

Reputation:

How to install OCaml modules?

# open Std;;
Characters 0-8:
  open Std;;
  ^^^^^^^^
Error: Unbound module Std

Run in the ocaml interpreter. I had previously installed ocaml-extlib-devel and ocaml-extlib. What else do I need to do to get the module installed?

(I'm working on RedHat Linux, FC-18).

Upvotes: 0

Views: 1646

Answers (1)

gasche
gasche

Reputation: 31469

What you need to do is:

#use "topfind";;
#require "extlib";;

You need to type those #, in additional to the prompt, because those are toplevel directives. They use the library findlib which also provides the ocamlfind tool and is probably installed in your OCaml environment (otherwise you should get it installed). It knows where to find ocaml packages in your filesystem.

Upvotes: 1

Related Questions