logo       

RE: dependant modules: msg#00146

programming.swig

Subject: RE: dependant modules

Since libswigpy is not distributed under Windows, I made
an empty module like this:

%module InsightRuntime

%runtime
%{
#define SWIG_GLOBAL
%}
// Dummy module to create the runtime library

Ran swig -c++ ...

To compile, you must use -DSWIG_GLOBAL (or it's equivalent under VC++). This
produces the equivalent
of the runtime code in a module. Just link other modules against it.

I found this solution worked equally well under Linux, and was more
satisfactory than libswigpy.

-dan

--
Daniel Blezek, Ph.D.
blezek@xxxxxxxxxx
Visualization and Computer Vision Lab, Imaging Technologies
GE Global Research Center


> -----Original Message-----
> From: David Beazley [mailto:beazley@xxxxxxxxxxxxxxx]
> Sent: Monday, January 27, 2003 8:31 AM
> To: Natas
> Cc: SWIG list
> Subject: Re: [Swig] dependant modules
>
>
> Natas writes:
> > >
> > > Are you running SWIG with the '-c' option and linking
> against the SWIG
> > > runtime libraries? If not, that's the problem. See
> > > Examples/python/import for an example.
> >
> > Oh, wow, that was painless. Thanks!
> >
> > I don't suppose there is any more painful ways to do this without
> > requiring my end users to have libswigpy on their system?
>
> Not really. The key problem here is that in order for modules to
> work together correctly, they have to share type information (which is
> more than just the signature strings). The runtime libraries take
> care of this.
>
> Cheers,
>
> Dave
>
>
> _______________________________________________
> Swig maillist - Swig@xxxxxxxxxxxxxxx
> http://mailman.cs.uchicago.edu/mailman/listinfo/swig
>
_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise