diff options
Diffstat (limited to 'Examples/octave/reference')
-rw-r--r-- | Examples/octave/reference/Makefile | 18 | ||||
-rw-r--r-- | Examples/octave/reference/example.cxx | 2 | ||||
-rw-r--r-- | Examples/octave/reference/example.h | 4 | ||||
-rw-r--r-- | Examples/octave/reference/example.i | 2 |
4 files changed, 7 insertions, 19 deletions
diff --git a/Examples/octave/reference/Makefile b/Examples/octave/reference/Makefile index d38d7f896..3b746de2f 100644 --- a/Examples/octave/reference/Makefile +++ b/Examples/octave/reference/Makefile @@ -1,17 +1,3 @@ -TOP = ../.. -SWIG = $(TOP)/../preinst-swig -CXXSRCS = example.cxx -TARGET = swigexample -INTERFACE = example.i -LIBS = -lm -SWIGOPT = +CXXSRCS = example.cxx -check: build - $(MAKE) -f $(TOP)/Makefile octave_run - -build: - $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp - -clean: - $(MAKE) -f $(TOP)/Makefile octave_clean +include $(SRCDIR)../example.mk diff --git a/Examples/octave/reference/example.cxx b/Examples/octave/reference/example.cxx index 9b72ca6a2..632a03a5b 100644 --- a/Examples/octave/reference/example.cxx +++ b/Examples/octave/reference/example.cxx @@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) { char *Vector::print() { static char temp[512]; - sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z); + sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z); return temp; } diff --git a/Examples/octave/reference/example.h b/Examples/octave/reference/example.h index 697afafe0..bcfcfb72f 100644 --- a/Examples/octave/reference/example.h +++ b/Examples/octave/reference/example.h @@ -4,8 +4,8 @@ class Vector { private: double x,y,z; public: - Vector() : x(0), y(0), z(0) { }; - Vector(double x, double y, double z) : x(x), y(y), z(z) { }; + Vector() : x(0), y(0), z(0) { } + Vector(double x, double y, double z) : x(x), y(y), z(z) { } friend Vector operator+(const Vector &a, const Vector &b); char *print(); }; diff --git a/Examples/octave/reference/example.i b/Examples/octave/reference/example.i index da09800c0..0aa733451 100644 --- a/Examples/octave/reference/example.i +++ b/Examples/octave/reference/example.i @@ -4,6 +4,8 @@ %module swigexample +%feature("autodoc", 1); + %{ #include "example.h" %} |