Sunday, February 22, 2015

Compiling Z3py on Windows

1. git clone Z3.
2. Install Python. (Either 2.x or 3.x is fine.)
  • Note that you have to install 64bit/32bit Python runtime on a 64bit/32bit machine; for otherwise the Z3py library would not initialize (would show a "dll not found" message).
3. Install Visual Studio Community if you don't have Vitual Studio installed. Add the command-line tools of VS to your PATH environment variables.
4. Install Windows SDKs for libraries.
5. Setup environment variables in Cygwin for nmake.
  • On my computer, I set these two:
    LIBPATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib"
    INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include"
    
6. Configure and nmake Z3
  • I have to remove BOM in file z3\src\api\dotnet\Properties\AssemblyInfo to resolve a decoding problem.
7. Done.

No comments:

Post a Comment