2011年2月18日星期五

SWIG tutorial

SWIG is the way to call C functions in Python.

http://www.swig.org/tutorial.html

http://www.swig.org/Doc1.3/Python.html

If you are using GCC 4.x under Ubuntu and using python 2.6 try the following

    $ swig -python module.i
$ gcc -fpic -I/usr/include/python2.6 -c module_wrap.c
$ gcc -shared module_wrap.o -o module.so

没有评论:

发表评论