I am not getting the z3 ocaml binding working on windows 7. Here is the process I followed.
- Installed Objective Caml version 3.11.0 (Microsoft toolchain)
- Installed camlidl-1.05 (built it using Microsoft Visual Studio 2008 + cygwin)
- Installed z3-3.0
- Built z3 ocaml binding by running "build.cmd".The build was successful.
- Copied the files generated by "build.cmd" from z3/ocaml to ObjectiveCaml/lib
Launched ocaml interactive and loaded "z3.cma"
# #load "z3.cma";; Characters -1--1: #load "z3.cma";; Error: The external function `get_theory_callbacks' is not available # Z3.mk_context;; Characters -1--1: Z3.mk_context;; Error: The external function `camlidl_z3_Z3_mk_context' is not available
Can someone please give me some hints?
EDIT 1: Building the example in "Z3-3.0\examples\ocaml":
Excerpt from build.cmd
set XCFLAGS=/nologo /MT /DWIN32
ocamlopt -ccopt "%XCFLAGS%" -o test_mlapi.exe -I ..\..\ocaml ole32.lib %OCAMLLIB%\libcamlidl.lib z3.cmxa test_mlapi.ml
I got the following error on executing build.cmd in the Visual Studio 2008 Command Prompt
** Fatal error: Cannot find file "/nologo"
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
On removing the -ccopt "%XCFLAGS%"
, it works fine. The generated exe also executes as expected. ( Note that I have flexdll in PATH ). Any idea why this might be happening?