On May 18, 2009, at 3:21 PM, Chris Colbert wrote: > "You can probably skip the "write my functions in a pure C source > file" step and write them directly in Cython. > > - Robert" > > > > i tried doing that today and was running into boat loads of trouble > resolving the IplImage data type and header dependencies. > > This is actually turning out to be quite difficult. > > The C function I am testing is this:
[...] > > and i'm compiling with this command on mingw: > gcc -shared -fPIC -fwrapv -O2 -fno-strict-aliasing -IC:\Python25 > \include -IC:\OpenCV\cxcore\include -IC:\OpenCV\otherlibs\highgui - > LC:\OpenCV\lib -o opencvcython.pyd opencvcython.c -lhighgui -lcxcore > > > and i get all sorts of undefined _pyobject references. This error seems like you're not linking to the python library. I would recommend using distutils to compile your files. Can you compile the Cython file print "hello" > the main reason i'm doing all of this is so i can chain together a > bunch of calls that can run outside of the gil. I don't mind > writing the functions in C if i have to. In fact, i compiled the > intial C code into a dll and called it from ctypes without trouble. > > any ideas to make this not-broke? This is totally doable from Cython. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
