问题
I am trying to use Z3's java binding, particularly trying to run the Java example JavaExample.java
that's distributed in Z3's 4.4.2 version.
JavaExample.java
was compiling fine when I was using the 4.4.2 com.microsoft.z3.jar file. However, it would not run because the default libz3java.dll
was 32-bit and my environment is 64-bit. I tried building a 64-bit Z3 with the -x
flag for its Makefile maker scripts/mk_make.py
but that generated an error when I ran nmake
(posted about that here).
Anyway, I then downloaded the binary for Z3 4.3.2 version, which contained a 64-bit libz3java.dll
. However, now JavaExample.java
doesn't compile, generating a ton of errors, such as:
FiniteDomainNum cannot be resolved to a type Z3Example.java line 2222
for line
FiniteDomainNum s1 = (FiniteDomainNum)ctx.mkNumeral(1, s);
There are hundreds of such errors.
The jar file is properly included in the Eclipse project, just like the 4.4.2 was when JavaExample.java
was compiling.
Any help on getting this going? Thanks.
回答1:
These errors are likely due to the fact that com.microsoft.z3.jar is missing or incomplete. You need to sort out the compilation issues described in the other post before the Java API will behave as it should.
来源:https://stackoverflow.com/questions/35286636/compile-errors-for-z3s-javaexample-java-test-of-java-bindings