logo       

RE: dependant modules: msg#00148

programming.swig

Subject: RE: dependant modules

Blezek, Daniel J (Research) writes:
> 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.
>

Whether or not this works depends on a lot of factors--including the
flags given to dlopen(). However, in principle, this will also work as
long as all of the other modules are still generated using 'swig -c'.

Cheers,
Dave

_______________________________________________
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