SWIG 1.3.14::: import error

Giorgi Lekishvili gleki at gol.ge
Thu Sep 5 05:39:00 EDT 2002

Hi all!

I well may have been missing something in new features of SWIG.

Any way, I have not found this in manual.

When I try to import a newly wrapped module, I get this error:
 >>>import PyArray
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: dynamic module does not define init function (initPyArray)


I guess _PyArray is linked somehow with libPyArray.so? What and where
did I miss simething?

I thought I did everything as I should:
1. I made PyArray.i
2. swig -c++ -python PyArray.i
3. g++ -c  PyArray_wrap.cxx -I/usr/local/include/Python2.0
4. g++ -shared Array.o PyArray_wrap.o -o PyArraymodule.so

Thank you in advance.

Regards, Giorgi

More information about the Python-list mailing list