Le lundi 25 juillet 2011 11:27:41, Vipul Raheja a écrit : > Hi, > > I am working on developing SWIG-Python wrappings for OSSIM, a tool for > satellite image processing. I wanted some help regarding the same since > GDAL uses Swig for the same. I am facing a problem regarding the > packaging. > > As of now I have developed SWIG-Wrapper interface files (.i Files) for 130 > different classes, and am ale to access them independently from a Python > console also; but I am not able to combine them into a single module so as > to be able to access them all together from a single import command, i.e. > suppose there are classes a.cpp/a.h and b.cpp/b.h, then I have created > their swig wrappers a.i and b.i, but in order to access them from a Python > console, I have to compile them separately, generate the .so file and when > I do an 'import module' in Python, I can access only one class's > functionality at a time (the one which I compiled). In order to access the > other class's functionality, I have to compile that class, generate the > .so file, and then I am able to import it. > > And what I want is that by doing a single compilation, .so generation and > import command, I should be able to access all the wrapped functions from > Python rather than the piece wise way which is happening currently. > > Any ideas on the issue? Help will be greatly appreciated.
I'm far from being the ultimate swig specialist, but I think that you could create a global .i that would %include each of the .i . Then you just run swig over that global .i > > Thanks and Regards, > Vipul Raheja _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev