1. Arlen Cox
  2. z3


z3 / README.ocaml

To build and use the OCaml binding on OS X, you need to install the basic prerequisites:

* A recent version of OCaml (this was tested with 4.00)
* findlib

Then build the Z3 libraries with the following commands:

# autoconf
# ./configure --prefix=/usr/local
# python scripts/mk_make.py
# cd build
# make

Then install Z3:

# sudo make install

Then change to the ml directory and build the bindings:

# cd ../src/api/ml
# make
# sudo make install

To use the z3 package use ocamlbuild:

ocamlbuild -use-ocamlfind -package z3 blah.byte

to build a blah.byte from blah.ml (and all dependencies) and to link with the Z3 package.

Alternatively you can add package(z3) to the _tags file for use with ocamlbuild.