diff --git a/maxsat/README.txt b/maxsat/README.txt index 749335945..82eb6bc2a 100644 --- a/maxsat/README.txt +++ b/maxsat/README.txt @@ -1,9 +1,6 @@ WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. -This directory contains scripts to build the MaxSAT application using -Microsoft C compiler, or gcc. - 1) Using Visual Studio (with Z3 source code release) The maxsat example application is automatically built when the z3-prover.sln is processed. The following command should be used to compile z3-prover.sln in the Z3 root directory diff --git a/test_capi/README-external.txt b/test_capi/README-external.txt deleted file mode 100644 index ede64e80a..000000000 --- a/test_capi/README-external.txt +++ /dev/null @@ -1,26 +0,0 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. Please go to the examples/c++ for examples using the new API. - -This directory contains scripts to build the test application using -Microsoft C compiler, or gcc. - -1) Using Microsoft C compiler - -Use 'build.cmd' to build the test application using Microsoft C -compiler. - -Remark: The Microsoft C compiler (cl) must be in your path, -or you can use the Visual Studio Command Prompt. - -The script 'exec.cmd' adds the bin directory to the path. So, -test_capi.exe can find z3.dll. - - -2) Using gcc - -Use 'build.sh' to build the test application using gcc. -The script 'exec.sh' adds the bin directory to the path. So, -test_capi.exe can find z3.dll. - -Remark: the scripts 'build.sh' and 'exec.sh' assumes you are in a -Cygwin or Mingw shell. - diff --git a/test_capi/README-linux.txt b/test_capi/README-linux.txt deleted file mode 100644 index a0e3fc405..000000000 --- a/test_capi/README-linux.txt +++ /dev/null @@ -1,8 +0,0 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. Please go to the examples/c++ for examples using the new API. - -This directory contains scripts to build the test application using gcc. - -Use 'build.sh' to build the test application using gcc. -The script 'exec.sh' adds the lib directory to the path. So, -test_capi can find libz3.so. - diff --git a/test_capi/README-osx.txt b/test_capi/README-osx.txt deleted file mode 100644 index fefe3cae9..000000000 --- a/test_capi/README-osx.txt +++ /dev/null @@ -1,8 +0,0 @@ -WARNING: this example still uses the old Z3 (version 3.x) C API. The current version is backward compatible. Please go to the examples/c++ for examples using the new API. - -This directory contains scripts to build the test application using gcc. - -Use 'build.sh' to build the test application using gcc. -The script 'exec.sh' adds the lib directory to the path. So, -test_capi can find libz3.dylib. - diff --git a/test_capi/README.txt b/test_capi/README.txt new file mode 100644 index 000000000..c23e632c4 --- /dev/null +++ b/test_capi/README.txt @@ -0,0 +1,25 @@ +WARNING: this example still uses the old Z3 (version 3.x) C API. +The current version is backward compatible. + +1) Using Visual Studio (with Z3 source code release) + +The test_capi application is automatically built when the z3-prover.sln is processed. The following command should be used to compile z3-prover.sln in the Z3 root directory + + msbuild /p:configuration=external + +The maxsat executable is located at + + ..\external\test_capi + +2) Using gcc (on Linux or OSX) + +Use 'build.sh' to build the test application using gcc. + +You must install Z3 before running this example. +To install Z3, execute the following command in the Z3 root directory. + + sudo make install + +Use 'build.sh' to build the test application using gcc. +It generates the executable 'test_capi'. + diff --git a/test_capi/build-external-linux.sh b/test_capi/build-external-linux.sh deleted file mode 100644 index ca7b5c953..000000000 --- a/test_capi/build-external-linux.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -fopenmp -o test_capi test_capi.c -I ../../include -L ../../lib -lz3 diff --git a/test_capi/build-external-osx.sh b/test_capi/build-external-osx.sh deleted file mode 100644 index ca7b5c953..000000000 --- a/test_capi/build-external-osx.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -fopenmp -o test_capi test_capi.c -I ../../include -L ../../lib -lz3 diff --git a/test_capi/build-external.cmd b/test_capi/build-external.cmd deleted file mode 100644 index 5ac5ca622..000000000 --- a/test_capi/build-external.cmd +++ /dev/null @@ -1 +0,0 @@ -cl /I ..\..\include ..\..\bin\z3.lib test_capi.c diff --git a/test_capi/build-external.sh b/test_capi/build-external.sh deleted file mode 100644 index d7b1f6123..000000000 --- a/test_capi/build-external.sh +++ /dev/null @@ -1 +0,0 @@ -gcc -fopenmp -o test_capi.exe -I ../../include ../../bin/z3.dll test_capi.c diff --git a/test_capi/build-static-linux.sh b/test_capi/build-static-linux.sh deleted file mode 100644 index 1d7f2fecc..000000000 --- a/test_capi/build-static-linux.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Note: Z3 was built using C++, so libz3.a has C++ dependencies. -# You can use gcc to link the program, but you need tell it -# to link the C++ libraries -g++ -fopenmp -static -I../../include -L../../lib test_capi.c -lz3 -o test_capi diff --git a/test_capi/build-static-osx.sh b/test_capi/build-static-osx.sh deleted file mode 100644 index 4a2889e94..000000000 --- a/test_capi/build-static-osx.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Note: Z3 was built using C++, so libz3.a has C++ dependencies. -# You can use gcc to link the program, but you need tell it -# to link the C++ libraries -g++ -fopenmp -I../../include test_capi.c ../../lib/libz3.a -o test_capi diff --git a/test_capi/build.sh b/test_capi/build.sh new file mode 100644 index 000000000..0caa7fff5 --- /dev/null +++ b/test_capi/build.sh @@ -0,0 +1,9 @@ +if gcc -fopenmp -o test_capi test_capi.c -lz3; then + echo "test_capi applicatio was successfully compiled." + echo "To try it, execute:" + echo " ./test_capi" +else + echo "You must install Z3 before compiling this example." + echo "To install Z3, execute the following command in the Z3 root directory." + echo " sudo make install" +fi diff --git a/test_capi/exec-external-linux.sh b/test_capi/exec-external-linux.sh deleted file mode 100644 index ced185c0f..000000000 --- a/test_capi/exec-external-linux.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH -./test_capi diff --git a/test_capi/exec-external-osx.sh b/test_capi/exec-external-osx.sh deleted file mode 100644 index 2fc2a0ac1..000000000 --- a/test_capi/exec-external-osx.sh +++ /dev/null @@ -1,2 +0,0 @@ -export DYLD_LIBRARY_PATH=../../lib:$DYLD_LIBRARY_PATH -./test_capi diff --git a/test_capi/exec-external.cmd b/test_capi/exec-external.cmd deleted file mode 100644 index b6310d5ac..000000000 --- a/test_capi/exec-external.cmd +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -SETLOCAL -set PATH=..\..\bin;%PATH% -test_capi.exe -ENDLOCAL diff --git a/test_capi/exec-external.sh b/test_capi/exec-external.sh deleted file mode 100644 index aa2ed0c7c..000000000 --- a/test_capi/exec-external.sh +++ /dev/null @@ -1,2 +0,0 @@ -export PATH=../../bin:$PATH -./test_capi.exe