*** FAQ for Batteries Included *** *** Common Problems *** **** "Error: Unbound module Batteries" Check that you're using ocamlfind with `-package batteries`, or `pkg(batteries)` in OCamlBuild _tags file to tell OCaml to make Batteries available to your code. *** General *** **** What is OCaml Batteries **** OCaml Batteries Included: a community-maintained foundation library for your OCaml projecs. **** What is it good for **** Batteries Included serves the following purposes: * define a standard set of libraries which may be expected on every compliant installation of OCaml * organize these libraries into a hierarchy of modules, with one source of documentation * provide a consistent API for otherwise independent libraries. *** Installation *** **** Errors **** ERROR: omake: Symbol `FamErrlist' has different size in shared object, consider re-linking This error is caused when using Gamin rather than FAM. Gamin is a binary-compatible replacement for libfam that does not use the system-wide monitor daemon. Most packages, however, are compiled and linked against libfam from the FAM package. They will work with Gamin without recompilation, but display the symbol size discrepancy warning. This error can safely be ignored. If you really want to get rid of the warning, on an Ubuntu based OS, run the following command: sudo apt-get install libfam0 Note that FAM misbehaves in certain environments, notably AFS-based systems. *** Using Batteries *** In your source code, add [open Batteries]. When you've done this, you'll have access to the Batteries modules that extend stdlib modules as part of the stdlib modules. To access the original stdlib modules, use [Legacy.List], for example. Other [BatFoo] modules provided by batteries are available as simply [Foo]. **** Compiling with Ocamlbuild **** Copy build/myocamlbuild.ml into your source directory, and use: <*>: package(batteries) in your _tags file to enable batteries for all modules. **** Bare Findlib **** ocamlfind ocamlc -package batteries -linkpkg foo.ml -o foo **** OMake **** Add the following to your OMakefile: OCAMLPACKS[] += batteries