|
From: Alan W. I. <ir...@be...> - 2011-09-08 20:47:50
|
On 2011-09-08 10:36-0700 Stefan Zager wrote: > This part of the documentation describes how to control where your > code gets injected into the output: > > http://www.swig.org/Doc2.0/SWIG.html#SWIG_nn40 > > Hope that helps. Thanks, Stefan. That helps a lot. We are still using swig-1.3.x, but the same useful code insertion documentation appears at http://www.swig.org/Doc2.0/SWIG.html#SWIG_nn40 To be specific it appears %{ #include "our_header.h" %} will put that #include in the header block (since %{...%} is shorthand for %header %{...%}). That was too late a position in the code, but apparently earlier possibilities for code insertion are available as well with, e.g., %begin %{ #include "our_header.h" %} Note I haven't yet had a chance to try this, but from the documentation it should be perfect for our needs. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |