<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Hi Even, <div><br></div><div>Thanks for the reply.</div>
<div><br></div><div>I was trying out the way you suggested it. I created a master.i which %includes all the other .i files. Upon compilation I am facing anther issue. It is a trivial issue I guess but I am not able to figure out. The things is, compilation with swig is usually in following steps -</div>
<div><br></div><div>$ swig -c++ -python -Wall -I/<path to header files to be included> master.i</div><div>This I am able to do fine, it generates "master_wrap.cxx" and "module.py" files</div><div>
<br></div><div>$ g++ -c - fPIC [path to file to be linked] master_wrap.cxx -I/<path to python library></div><div>Now since there are multiple files that need to be linked, I am not able to figure out what to write here in place of [path to file to be linked]. It is supposed to be the address of source file to be linked but in this case, there are multiple files spread in multiple folders that need to be linked.</div>
<div><br></div><div>Upon giving the address of the parent folder, it says, "linker input file unused because linking not done", clearly since it wants a filename and not a folder address.</div><div><br></div><div>
Kindly Help.</div><div><br></div><div>Regards,</div><div>Vipul Raheja</div><div></div></span><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 11:19 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Le lundi 25 juillet 2011 11:27:41, Vipul Raheja a écrit :<br>
<div><div></div><div class="h5">> Hi,<br>
><br>
> I am working on developing SWIG-Python wrappings for OSSIM, a tool for<br>
> satellite image processing. I wanted some help regarding the same since<br>
> GDAL uses Swig for the same. I am facing a problem regarding the<br>
> packaging.<br>
><br>
> As of now I have developed SWIG-Wrapper interface files (.i Files) for 130<br>
> different classes, and am ale to access them independently from a Python<br>
> console also; but I am not able to combine them into a single module so as<br>
> to be able to access them all together from a single import command, i.e.<br>
> suppose there are classes a.cpp/a.h and b.cpp/b.h, then I have created<br>
> their swig wrappers a.i and b.i, but in order to access them from a Python<br>
> console, I have to compile them separately, generate the .so file and when<br>
> I do an 'import module' in Python, I can access only one class's<br>
> functionality at a time (the one which I compiled). In order to access the<br>
> other class's functionality, I have to compile that class, generate the<br>
> .so file, and then I am able to import it.<br>
><br>
> And what I want is that by doing a single compilation, .so generation and<br>
> import command, I should be able to access all the wrapped functions from<br>
> Python rather than the piece wise way which is happening currently.<br>
><br>
> Any ideas on the issue? Help will be greatly appreciated.<br>
<br>
</div></div>I'm far from being the ultimate swig specialist, but I think that you could<br>
create a global .i that would %include each of the .i . Then you just run swig<br>
over that global .i<br>
<div><div></div><div class="h5"><br>
><br>
> Thanks and Regards,<br>
> Vipul Raheja<br>
</div></div></blockquote></div><br>