title: How can I add opencv libraries to setup.py?
body: <p>I have created an embedded Python code where a C++ function is called from Python. I have created the setup.py as following. </p>
  
  <pre><code>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])
  </code></pre>
  
  <p>But I am getting this error.</p>
  
  <pre><code>ImportError: /usr/local/lib/python2.7/dist-packages/getGender.so: undefined symbol: _ZN2cv3Mat10deallocateEv
  </code></pre>
  
  <p>How can I reference these opencv libraries in my setup.py? Please advice.</p>