HI,

I think I have a similar question.suppose I have an interface file in the following folder:

<somepath>/myProject/module/interface.i

let say I have an include file in the same folder
<somepath>/myProject/module/a.h
<somepath>/myProject/module/a.c

Now in the interface.i I can add something like %include "a.h"

But lets say I have another header file in another folder in myProject;
<somepath>/myProject/common/com.h
<somepath>/myProject/common/com.c

Now how do I add the com.h header in my interface.i file ?

Varum is this also your question ?

Thanks for answering

pluto mars


On Wed, Oct 16, 2013 at 12:26 PM, Toivo Henningsson <toivo.henningsson@modelon.com> wrote:
I'm not sure that I really understand your problem. What kind of error message do you get, and when doing what?

 / Toivo

> From: Varun Gupta [mailto:varun06gupta@gmail.com]
> Sent: den 16 oktober 2013 10:52
> To: Toivo Henningsson
> Cc: swig-user@lists.sourceforge.net
> Subject: Re: [Swig-user] Regarding interface file for swig
>
> Thanks for the information. This thing I tried but it also not getting header files. Do I need to add something in interface file also like %import ...........? I am having some 20 header files to include which are in some 5 different folders at different locations. > Can you please explain with some example.
> Regards
> Varun
>
> On Wed, Oct 16, 2013 at 1:44 PM, Toivo Henningsson <toivo.henningsson@modelon.com> wrote:
> > From: varungupta [mailto:varun06gupta@gmail.com]
> > Sent: den 16 oktober 2013 09:12
> > To: swig-user@lists.sourceforge.net
> > Subject: [Swig-user] Regarding interface file for swig
> >
> > Hello I am beginner for swig. I am trying to generate python wrapper for C++ API's. I tried with simple C++ code and it was working fine. Then I started working on API's and when I tried to create a python wrapper for a single API ( by placing all the  headers in the interface file), I got an error saying that some .h files are missing. I found out that the some header files are in some other folder. Please let me know how it is possible to add a header file present in a different folder into the interface file by writing some loops, conditions etc. Please suggest. Regards Varun

> You can use the -I (capital i) command line option to SWIG to specify include directories. Command line options are documented at http://www.swig.org/Doc2.0/SWIG.html#SWIG_nn2

> Hope that helps,
> Toivo

This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Modelon does not accept or assume any liability or responsibility for any use of or reliance on this email.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Swig-user mailing list
Swig-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user