« Return to Thread: Most trivial example - failure

Most trivial example - failure

by Smith Jack (Ext. - UGIS - UniCredit Group) :: Rate this Message:

Reply to Author | View in Thread

I am trying to understand how SWIG behaves.

I have a C++ project which creates a library
The project contains the class header and cpp files as follows.

// ------------- File a_lib.h
class a_lib {
public:
        a_lib(void);
       
        void func( );
};
-------------------------------
// ------------- File a_lib.cpp
a_lib::a_lib()
{
}

void a_lib::func()
{
           
}
-------------------------------

I also have a swig interface file as follows

/* File a_lib_swig.i */
%module a_lib_swig
%{
        #include "a_lib.h"
%}

%include "a_lib.h"


>From the very beginning I am confused.

What is a module ?  Why is the %module declaration needed ?  What is it
telling swig to do ?
Why am I hash-including and percent-including the same file ?
If I hash-include, surely swig now knows about the class, why would I
need to tell it again ?
Where is the definitive list of swig reserved words and their meanings ?
This does not seem to appear anywhere in any documentation I can find on
swig.



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

 « Return to Thread: Most trivial example - failure