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
# make
# make dylib
# make lib

Then copy the libraries to the appropriate location:

# cp bin/external/z3 /usr/local/bin
# cp bin/external/libz3.dylib /usr/local/lib
# cp bin/external/libz3.a /usr/local/lib

Then change to the ml directory and build the bindings:

# make
# sudo make install

To use the z3 package use ocamlbuild:

ocamlbuild -use-ocamlfind -package z3 blah.byte

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

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