Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (44 sloc) 2.088 kB
12acfa2 faq proposal
ben le kuin authored
1 *** FAQ for Batteries Included ***
2
3 *** General ***
4
5 **** What is OCaml Batteries ****
6
7 OCaml Batteries Included: a community-maintained foundation library for your OCaml projecs.
8
9
10 **** What is it good for ****
11
12 Batteries Included serves the following purposes:
13 * define a standard set of libraries which may be
14 expected on every compliant installation of OCaml
15 * organize these libraries into a hierarchy of modules,
16 with one source of documentation
17 * provide a consistent API for otherwise independent
18 libraries.
19
20 *** Installation ***
21
22 **** Errors ****
23
24 ERROR: omake: Symbol `FamErrlist' has different size in shared object, consider re-linking
25
11161e3 @mdekstrand Cleaned up FAQ text.
mdekstrand authored
26 This error is caused when using Gamin rather than FAM. Gamin is a
27 binary-compatible replacement for libfam that does not use the
28 system-wide monitor daemon. Most packages, however, are compiled and
29 linked against libfam from the FAM package. They will work with Gamin
30 without recompilation, but display the symbol size discrepancy
31 warning. This error can safely be ignored.
12acfa2 faq proposal
ben le kuin authored
32
a8fb609 @mdekstrand Update note in faq about Fam/gamin
mdekstrand authored
33 If you really want to get rid of the warning, on an Ubuntu based OS,
34 run the following command:
12acfa2 faq proposal
ben le kuin authored
35
a8fb609 @mdekstrand Update note in faq about Fam/gamin
mdekstrand authored
36 sudo apt-get install libfam0
11161e3 @mdekstrand Cleaned up FAQ text.
mdekstrand authored
37
38 Note that FAM misbehaves in certain environments, notably AFS-based
39 systems.
8d433aa @thelema usage instructions in FAQ
thelema authored
40
41
42 *** Using Batteries ***
43
44 In your source code, add [open Batteries] for the multithreaded
45 batteries library. If you want to build without threads, use [open
46 Batteries_uni] instead. When you've done this, you'll have access to
47 the batteries modules that extend stdlib modules as part of the stdlib
48 modules. To access the original stdlib modules, use [Legacy.List],
49 for example. Other [BatFoo] modules provided by batteries are
50 available as simply [Foo].
51
52 **** Compiling with Ocamlbuild ****
53
d7c9193 @thelema Fix path of myocamlbuild.ml and ocamlfind compilation command
thelema authored
54 Copy build/myocamlbuild.ml into your source directory, and use:
8d433aa @thelema usage instructions in FAQ
thelema authored
55
56 <*>: pkg_batteries, pkg_threads
57
58 in your _tags file to enable batteries for all modules.
59
60 **** Bare Findlib ****
61
d7c9193 @thelema Fix path of myocamlbuild.ml and ocamlfind compilation command
thelema authored
62 ocamlfind ocamlc -thread -package batteries -linkpkg foo.ml -o foo
8d433aa @thelema usage instructions in FAQ
thelema authored
63
64 **** OMake ****
65
66 Add the following to your OMakefile:
67
68 OCAMLPACKS[] += batteries
69 OCAMLFLAGS += -thread
Something went wrong with that request. Please try again.