>
>
> 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"
>
>
> This is totally doable from Cython.
>
>
 I can compile and use cython modules that don't depend on external c
libraries with no problem.


i thought it was using the external libraries that was killing me, but you
were right, it was a python linking problem.

using the following distutils script solved my problem, and everything is
working.

Thanks Robert!

Chris

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

sourcefiles = ['opencvcython.pyx']
include_dirs = ['C:\OpenCV\cxcore\include',
                'C:\OpenCV\otherlibs\highgui',
                'C:\OpenCV\cv\include',
                'C:\OpenCV\ml\include']
library_dirs = ['C:\OpenCV\lib']
libraries = ['highgui',
        'cxcore',
        'cv',
        'cvaux',
        'cxts',
        'cvhaartraining',
        'ml']



setup(
    cmdclass = {'build_ext': build_ext},
    ext_modules = [Extension("opencvcython", sourcefiles,
                                include_dirs=include_dirs,
                                library_dirs=library_dirs,
                                libraries = libraries)])
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to