Hey guys, this is probably going to be the most basic question you'll see on here, but I have looked everywhere (including this forum board/mailing list) to figure it out, and I still can't find it. I'm using SWIG with Python (as this says), and I've been trying it out with Python 2.4 (since I read up that later versions of Python won't work). I've downloaded and installed Cygwin and devel inside of it. I've also installed PRC tools (which includes gcc in it). I've made my environment variables, the paths link to swig and gcc. I'll make my .c file, I've tried a lot of things but the example I'll show you was:
/* File: example.c */
int funct() {
return 0;
}
and I've made a .i file:
%module example
%{
%}
extern int funct();
which is named example.i Next I wrap my c code within cygwin:
$ swig -python example.i
and I've received my example_wrap.c and example.py. Next I follow instructions (no idea what this next line does) and do this:
$ gcc -c example.c
and that works out fine, I get my example.o file. Finally I try out the next line I'm required to use:
gcc -I/usr/include/python2.4 -c example_wrap.c
(it didn't work, but I thought it looked a little funny so I changed it around to..)
gcc C:/Python24/include -c example_wrap.c
I tried that other line since that's where my pyconfig.h and Python.h file are both located. When I do this I get a huge number of errors all flooded out at me, all of them complaining about example_wrap.c. I could copy some of the errors out if you guys want, but it has numerous complaints for just about every line (up to line 3212) within example_wrap.c. I'm sure it's something really obvious and simple, but I've tried numerous tutorials and methods and changing around environment variables and code and everything, I think it's time to ask for help. Any ideas? Thanks so much for any help, it's really appreciated.