diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 533d7671b..4b3a1aeaa 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1765,7 +1765,7 @@ class MLComponent(Component): stubso = os.path.join(self.sub_dir, self.stubs) + '$(OBJ_EXT)' z3dllso = get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT)' out.write('%s: %s %s\n' % (stubso, stubsc, z3dllso)) - out.write('\t%s -ccopt "$(CXXFLAGS_OCAML) -I %s -I %s -I %s -o %s" -c %s\n' % + out.write('\t%s -ccopt "$(CXXFLAGS_OCAML) -I %s -I %s -I %s $(CXX_OUT_FLAG)%s" -c %s\n' % (OCAMLC, OCAML_LIB, api_src, src_dir, stubso, stubsc)) for m in self.modules: diff --git a/src/api/ml/z3native_stubs.h b/src/api/ml/z3native_stubs.h index 7bd6af73f..ef81ac239 100644 --- a/src/api/ml/z3native_stubs.h +++ b/src/api/ml/z3native_stubs.h @@ -21,12 +21,10 @@ Notes: #define Z3NATIVE_STUBS_H_ #if defined _WIN32 || defined __CYGWIN__ - #ifdef BUILDING_DLL - #ifdef __GNUC__ - #define DLL_PUBLIC __attribute__ ((dllexport)) - #else - #define DLL_PUBLIC __declspec(dllexport) - #endif + #ifdef __GNUC__ + #define DLL_PUBLIC __attribute__ ((dllexport)) + #else + #define DLL_PUBLIC __declspec(dllexport) #endif #define DLL_LOCAL #else