Ah, I'm having a stupid day. I need to use the same name for the .so as the source file. Doh!
Chris On Tue, Sep 29, 2009 at 3:15 PM, Chris Colbert <[email protected]> wrote: > I'm getting the following error when import a simple cython extension module: > > ImportError: dynamic module does not define init function > (initcythonsuperquadricfit) > > > the following is how i built the module... doesnt seem there is a problem: > > brucewa...@broo:~/Desktop/object_reconstruction$ cython superquadricfit.pyx > warning: /usr/local/lib/python2.6/dist-packages/Cython-0.11.3- > py2.6-linux-x86_64.egg/Cython/Includes/numpy.pxd:170:33: String > literals will no longer be Py3 bytes in Cython 0.12. > > brucewa...@broo:~/Desktop/object_reconstruction$ gcc -shared -pthread > -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.6 > -I/usr/local/lib/python2.6/dist-packages/numpy/core/include/numpy -o > cythonsuperquadricfit.so superquadricfit.c > > /usr/include/python2.6/numpy/__multiarray_api.h:959: warning: > ‘_import_array’ defined but not used > superquadricfit.c:739: warning: ‘__pyx_k_3’ defined but not used > superquadricfit.c:740: warning: ‘__pyx_k_4’ defined but not used > superquadricfit.c:760: warning: ‘__pyx_k_24’ defined but not used > superquadricfit.c:766: warning: ‘__pyx_k_26’ defined but not used > superquadricfit.c:767: warning: ‘__pyx_k_27’ defined but not used > > > One thing that i can seem to get around are the header files that are > being used for compilation. I have both numpy 1.2.1 installed as well > as 1.3.0. > > The 1.2.1 is the system numpy which satisfies package dependicies, and > the 1.3.0 is my home built numpy in my local directory. I've included > the directory to the header files for the 1.3 version, but it seems > they are ignored no matter which order I issue the include statements > to gcc. It always uses the system numpy headers. > > Could that be the problem? > > Cheers, > > Chris > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
