From: Eliot B. <el...@bl...> - 2006-07-13 21:42:26
|
Xiaoshuo Cai wrote: > Hi all, > I got some problem when I trying to make a extending module for python > by using SWIG. > The context is describe below: > > I have a C source file below: > > /* test.c*/ > #include <stdio.h> > > static void test_swig(); > > static void test_swig() { > printf("static test!"); > } > I can import the "test" module and invoke function test.swig() > > Above is just a example that I use to describe my problem. In my > project, I need define some static function in C and port it to Python. > Thus could anyone know how can I do to get it through wiht "static > function" problem Get rid of the static. This is just how C works, nothing to do with swig. A static function will have no visibility outside the file it is defined in, so the swig wrapper just cannot refer to it. -- Eliot |