|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
SWIG and Python/* 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. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
|
|
Re: SWIG and PythonLourve Struck wrote:
> I've been trying it out with > Python 2.4 (since I read up that later versions of Python won't work). Won't work for what? 2.5 has been out and stable a long time now. > $ gcc -c example.c You really want to build with distutils: http://www.swig.org/Doc1.3/Python.html#Python_nn6 We really need to rename those docs something other that "Development Docs" the other ones are very, very old, at least with respect to building extensions with Python. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
|
|
Re: SWIG and PythonChristopher Barker wrote:
> We really need to rename those docs something other that "Development > Docs" the other ones are very, very old, at least with respect to > building extensions with Python. And update the "Building a Python Module" section here: http://www.swig.org/Doc1.3/Introduction.html#Introduction_nn8 -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
| Free Forum Powered by Nabble | Forum Help |