Skip to content

Commit cae88de

Browse files
committed
Now works for windows and includes scalaz3 correctly.
Instructions added.
1 parent 8f63442 commit cae88de

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,29 @@ For testing, run
3131
Windows
3232
-------
3333

34+
### Prerequisites
35+
3436
Install Visual Studio Community edition 2015
3537
Make sure to have the following:
3638
- Programming Languages
3739
- Visual C++
3840
- Common tools for Visual C++ 2015 (CHECK)
3941

42+
Install JDK 1.8
43+
* There is a folder `include` in `C:\Program Files\Java\jdk1.8.0_121`. Create a copy of this `include` folder directly in `C:\Program Files\Java\`
44+
45+
Install a 64-bit version of GCC. To chec that, run `gcc -v`, it should display 64. If it shows `mingw32` you need to install a new version.
46+
47+
We were able to successfully package and test ScalaZ3 with the MinGW 64bit compiler suite with the following options.
48+
49+
Version: 6.3.0
50+
Architecture: x86_64
51+
Threads: wind32
52+
Esception: seh
53+
Build revision: 2
54+
55+
### Packaging instructions
56+
4057
Open the native x64 command prompt (available in the start menu under the Visual Studio folder)
4158

4259
Now navigate to the scalaz3 folder and type:
@@ -45,3 +62,15 @@ Now navigate to the scalaz3 folder and type:
4562

4663
The JAR files will be in `target/scala-2.XX/scalaz3_2.XX-3.0.jar` and will contain the shared library
4764
dependencies.
65+
66+
### Test your package.
67+
68+
Run
69+
70+
sbt test
71+
72+
If this does not work, check that `lib-bin/scalaz3.dll` is a correctly set up 64 bit dll:
73+
74+
dumpbin /headers lib-bin/scalaz3.dll | findstr machine
75+
76+
The output should be (x64). If you encounter any other issue, please let us know.

lib-bin/libz3.dll

-7.79 MB
Binary file not shown.

project/Build.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ object ScalaZ3Build extends Build {
208208
"-lz3 -fPIC -O2 -fopenmp", s)
209209

210210
} else if (isWindows) {
211-
exec("gcc -std=gnu89 -shared -o " + libBinFilePath.absolutePath + " " +
211+
exec("gcc -std=gnu89 -m64 -shared -o " + libBinFilePath.absolutePath + " " +
212212
"-D_JNI_IMPLEMENTATION_ -Wl,--kill-at " +
213213
"-D__int64=\"long long\" " +
214214
"-I " + "\"" + jdkIncludePath.absolutePath + "\" " +
215215
"-I " + "\"" + jdkWinIncludePath.absolutePath + "\" " +
216-
"-Wreturn-type " +
217-
z3BinFilePath.absolutePath + "\" ", s)
216+
"-I " + "\"" + z3BinFilePath.getParentFile.absolutePath + "\" " +
217+
"-Wreturn-type ", s)
218218

219219
} else if (isMac) {
220220
val frameworkPath = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers"

0 commit comments

Comments
 (0)