At the moment, on most computers, the easiest manner of installing
OCaml Batteries Included on your computer is to take advantage
of GODI
, a package manager specifically dedicated to OCaml. You will
first need to install GODI, if GODI isn't install on your machine yet,
then to select package batteries
in the list of packages
and accept the decisions of GODI. This should take care of installing
OCaml Batteries Included for you.
Note that producing the documentation is long (typically 10-15 minutes).
On Fedora / Debian / Red Hat / Ubuntu stations,
packages libbatteries-ocaml-dev
.
This should take care of installing OCaml Batteries Included for you.
To perform installation of OCaml Batteries Included manually, please make sure that you have already installed all the following tools and libraries:
Once all these libraries are installed, you may download and uncompress the latest version of OCaml Batteries Included, enter the directory produced by decompression and invoke
make all install doc install-docto build and install both the byte-code version, the native version and the documentation of OCaml Batteries Included.
ocamlfind batteries/ocaml
, or if you have rlwrap
installed,
rlwrap ocamlfind batteries/ocaml
for readline enabled command editing.
Alternatively, install ocamlinit
from the batteries
source directory into your ~/.ocamlinit
file and launch
ocaml normally
ocaml
.
doc/batteries/myocamlbuild.ml
is an extension of OCamlBuild. It defines Control.Concurrency.Threads
.pkg_batteries
, you need to
start your files with open Batteries_uni
if not using
threads or open Batteries
if using threads.pkg_batteries
, you need to
start your files with open Batteries_uni
if not using
threads or open Batteries
if using threads._tags
, placed in the same directory
as your files. For instance, to have my_file.ml
compiled with
Batteries Included as a library and my_other_file.ml
compiled
with both the library, the language extensions and boiler-plate code, your
file _tags
should read:
<my_file.ml>: pkg_batteries <my_other_file.ml>: use_batteries,use_boilerplateThe order of lines doesn't matter, nor does the order of tags on one line. For more informations on
myocamlbuild.ml
and _tags
, see
the documentation
of OCamlBuild.