Thanks to point this out.
It confirmed that I thought : must _manually_ write set/get functions
for every array in a every structure (it looks like middle-age ;) ).
Coz of this and a few other stuff, while looking at my code, I came to
the conclusion that I will be better writing interface C
On Aug 17, 11:30 pm, [EMAIL PROTECTED] wrote:
Anish Chapagain, I already know how to use structure, as my example
shown it.
I had trouble only with the nested structures, and it was coz of
missing typedef (ie: Swig need C struct declaration, not C++).
And I still cannot find how to get my
Anish Chapagain, I already know how to use structure, as my example
shown it.
I had trouble only with the nested structures, and it was coz of
missing typedef (ie: Swig need C struct declaration, not C++).
And I still cannot find how to get my arrays... :-S
--
Hello,
I spent almost a week to be able to embed Python within my C++ game
engine.
I wrote a mini-tutorial of what I was able to do so far here :
http://forums.indiegamer.com/showpost.php?p=169352postcount=9
At the end of my tutorial, I wrote : You can do the same with C++
classes, and with
Ok, Swig needs the structure to be declared like this :
typedef struct SIn
{
int in1, in2;
} SIn;
Else, it doesn't understand it's a structure... :-S
Now, I can write to it.
I also found out that Swig didn't allow to write to the array :
http://www.swig.org/Doc1.3/SWIG.html#SWIG_nn34 ...
Hi,
If you have struct defined in .h file then it's ok or can dea easyily
with struct written with .i file,
in .h file,
struct def
{
int a;
char name[10];
};
can be referenced as
strvar=new_def() //now strvar is