diff --git a/Examples/python/import/Makefile b/Examples/python/import/Makefile index fa49f3145..4d3f7b5f7 100644 --- a/Examples/python/import/Makefile +++ b/Examples/python/import/Makefile @@ -3,15 +3,17 @@ SWIG = $(TOP)/../preinst-swig SWIGOPT = LIBS = -all:: +all:: + $(CXX) -shared -o cbase.so cbase.cxx + $(CXX) -shared -o cbar.so cbar.cxx $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \ - LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' python_cpp + LIBS='$(LIBS) cbase.so' TARGET='base' INTERFACE='base.i' python_cpp $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \ - LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp + LIBS='$(LIBS) cbase.so' TARGET='foo' INTERFACE='foo.i' python_cpp $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \ - LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp + LIBS='$(LIBS) cbase.so cbar.so' TARGET='bar' INTERFACE='bar.i' python_cpp $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \ - LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' python_cpp + LIBS='$(LIBS) cbase.so cbar.so' TARGET='spam' INTERFACE='spam.i' python_cpp clean:: diff --git a/Examples/python/import/bar.h b/Examples/python/import/bar.h index fa4185f1f..2eacde4f3 100644 --- a/Examples/python/import/bar.h +++ b/Examples/python/import/bar.h @@ -3,7 +3,7 @@ class Bar : public Base { public: Bar() { } - ~Bar() { } + ~Bar(); virtual void A() { printf("I'm Bar::A\n"); } diff --git a/Examples/python/import/base.h b/Examples/python/import/base.h index 5a266f68c..a7a5a413d 100644 --- a/Examples/python/import/base.h +++ b/Examples/python/import/base.h @@ -3,7 +3,7 @@ class Base { public: Base() { }; - virtual ~Base() { }; + virtual ~Base(); virtual void A() { printf("I'm Base::A\n"); } diff --git a/Examples/python/import/cbar.cxx b/Examples/python/import/cbar.cxx new file mode 100644 index 000000000..9f302a5f0 --- /dev/null +++ b/Examples/python/import/cbar.cxx @@ -0,0 +1,5 @@ +#include "bar.h" + +Bar::~Bar() +{ +} diff --git a/Examples/python/import/cbase.cxx b/Examples/python/import/cbase.cxx new file mode 100644 index 000000000..cab4765ad --- /dev/null +++ b/Examples/python/import/cbase.cxx @@ -0,0 +1,3 @@ +#include "base.h" + +Base::~Base() { }