From bdbb27dbb32c456532d03395d9cc5149fcf5de11 Mon Sep 17 00:00:00 2001 From: MikAnd Date: Fri, 19 Oct 2018 17:19:48 +0200 Subject: [PATCH 1/6] Trying to fix compilation on MSVC --- yices_python.i | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yices_python.i b/yices_python.i index 2049a9d..3a52146 100644 --- a/yices_python.i +++ b/yices_python.i @@ -241,7 +241,10 @@ int32_t yices_get_rational64_value(model_t *mdl, term_t t, int64_t *OUTPUT, uint __YICES_DLLSPEC__ extern int32_t yices_get_bv_value_width(model_t *mdl, term_t t, uint32_t width, - int32_t val[]) + int32_t val[]); + +int32_t yices_get_bv_value_width(model_t *mdl, term_t t, uint32_t width, + int32_t val[]); { return yices_get_bv_value(mdl, t, val); } From 3946870609236e3a58488927693252c6a9a69ebf Mon Sep 17 00:00:00 2001 From: MikAnd Date: Fri, 19 Oct 2018 17:29:32 +0200 Subject: [PATCH 2/6] Trying to fix compilation on MSVC --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ddc57ae..5628624 100644 --- a/setup.py +++ b/setup.py @@ -37,10 +37,14 @@ # Major number is Yices Version, minor number creation date of the bindings YICESPY_VERSION='%s.%s' % (YICES_VERSION, YICESPY_MINOR_VERSION) +extra_include = [] +if 'C_INCLUDE_PATH' in os.environ: + extra_include.append(os.environ['C_INCLUDE_PATH']) + yices_ext = Extension('_yicespy', ['yices_python.i'], swig_opts=['-I%s'%os.path.join(YICES_DIR, "include")], - include_dirs=[os.path.join(YICES_DIR, "include"),os.environ['C_INCLUDE_PATH']], + include_dirs=[os.path.join(YICES_DIR, "include")], library_dirs=[os.path.join(YICES_DIR, "lib")], runtime_library_dirs=[os.path.join(YICES_DIR, "lib")], libraries=['yices'], From b03a9bcdd5a9002f8322793a3ce68f6c62294da6 Mon Sep 17 00:00:00 2001 From: MikAnd Date: Fri, 19 Oct 2018 17:32:05 +0200 Subject: [PATCH 3/6] Trying to fix compilation on MSVC --- yices_python.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yices_python.i b/yices_python.i index 3a52146..4851534 100644 --- a/yices_python.i +++ b/yices_python.i @@ -244,7 +244,7 @@ __YICES_DLLSPEC__ extern int32_t yices_get_bv_value_width(model_t *mdl, int32_t val[]); int32_t yices_get_bv_value_width(model_t *mdl, term_t t, uint32_t width, - int32_t val[]); + int32_t val[]) { return yices_get_bv_value(mdl, t, val); } From efe8f8330266b2dc246915adb6e5dde81bd29ffa Mon Sep 17 00:00:00 2001 From: MikAnd Date: Fri, 19 Oct 2018 17:40:23 +0200 Subject: [PATCH 4/6] Trying to fix compilation on MSVC --- setup.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 5628624..87c1168 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ import os, sys import optparse +import platform -from setuptools import setup -from distutils.extension import Extension +from setuptools import setup, Extension from datetime import datetime @@ -40,15 +40,17 @@ extra_include = [] if 'C_INCLUDE_PATH' in os.environ: extra_include.append(os.environ['C_INCLUDE_PATH']) - +libraries = ['yices'] +if platform.system() == 'Windows': + libraries += ['psapi', 'mpir'] yices_ext = Extension('_yicespy', ['yices_python.i'], swig_opts=['-I%s'%os.path.join(YICES_DIR, "include")], include_dirs=[os.path.join(YICES_DIR, "include")], library_dirs=[os.path.join(YICES_DIR, "lib")], runtime_library_dirs=[os.path.join(YICES_DIR, "lib")], - libraries=['yices'], - language='c', + libraries=libraries, + language='c++', ) short_description="Yices SMT-Solver Wrapper" From 2d7e9217962510a9cad2222badd92dd8d42a1fb2 Mon Sep 17 00:00:00 2001 From: MikAnd Date: Fri, 19 Oct 2018 17:44:00 +0200 Subject: [PATCH 5/6] Trying to fix compilation on MSVC --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 87c1168..78a57c7 100644 --- a/setup.py +++ b/setup.py @@ -41,14 +41,16 @@ if 'C_INCLUDE_PATH' in os.environ: extra_include.append(os.environ['C_INCLUDE_PATH']) libraries = ['yices'] +runtime_libraries=[os.path.join(YICES_DIR, "lib")] if platform.system() == 'Windows': libraries += ['psapi', 'mpir'] + runtime_libraries = [] yices_ext = Extension('_yicespy', ['yices_python.i'], swig_opts=['-I%s'%os.path.join(YICES_DIR, "include")], include_dirs=[os.path.join(YICES_DIR, "include")], library_dirs=[os.path.join(YICES_DIR, "lib")], - runtime_library_dirs=[os.path.join(YICES_DIR, "lib")], + runtime_library_dirs=runtime_libraries, libraries=libraries, language='c++', ) From 986460eb1c8ae1781a41b38e5ea95c0888dccfc7 Mon Sep 17 00:00:00 2001 From: MikAnd Date: Mon, 22 Oct 2018 16:06:09 +0200 Subject: [PATCH 6/6] Fixing yices for windows --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 78a57c7..0396cb5 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ libraries = ['yices'] runtime_libraries=[os.path.join(YICES_DIR, "lib")] if platform.system() == 'Windows': - libraries += ['psapi', 'mpir'] + libraries = ['libyices', 'psapi', 'mpir'] runtime_libraries = [] yices_ext = Extension('_yicespy', ['yices_python.i'],