Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

How can I add opencv libraries to setup.py?

$
0
0
I have created an embedded Python code where a C++ function is called from Python. I have created the setup.py as following. from distutils.core import setup,Extension extension_mod=Extension('getGender',['getGender.cpp'],library_dirs=['/usr/local/include/opencv2/contrib','/usr/local/include/opencv2/core','/usr/local/include/opencv2/highgui','/usr/local/include/opencv2/imgproc','/usr/local/include']) setup(name='getGender',ext_modules=[extension_mod]) But I am getting this error. ImportError: /usr/local/lib/python2.7/dist-packages/getGender.so: undefined symbol: _ZN2cv3Mat10deallocateEv How can I reference these opencv libraries in my setup.py? Please advice.

Viewing all articles
Browse latest Browse all 41027