SWIG for Win95/Python1.5.2
Mark Hammond
mhammond at skippinet.com.au
Tue Nov 9 05:05:11 EST 1999
Add a "/D __WIN32__" to the C compiler, and it should fix it.
At the top of the file there should be a series of #ifdef's etc that will
end up with:
# define SWIGEXPORT(a,b) __declspec(dllexport) a b
This magic will solve the problem. In a nutshell, this is exposing the
initfoo function as a public function from the DLL.
Mark.
moonseeker at my-deja.com wrote in message <808n8t$gv1$1 at nnrp1.deja.com>...
>Hi!
>
>I tried to compile the example (renamed as test1) in the SWIG introduction:
...
>It compiled and linked correct, but if I try to import it in Python 1.5.2:
>
>>>> import test1module
>Traceback (innermost last):
> File "<stdin>", line 1, in ?
>ImportError: dynamic module does not define init function (inittest1module)
More information about the Python-list
mailing list