python extensions: including project local headers
philip at semanchuk.com
Thu Oct 23 17:43:22 CEST 2008
On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote:
> Hey everyone,
> I'm working on a python extension wrapper around Rob Hess'
> implementation of a SIFT feature detector. I'm working on a
> computer-vision based project that requires interfacing with Python at
> the higher layers, so I figured the best way to handle this would be
> C (since my initial implementation in python was ungodly and slow).
> I can get distutils to compile the extension and install it in the
> python path, but when I go to import it I get the wonderful exception:
> ImportError: /usr/lib/python2.5/site-packages/pysift.so: undefined
> symbol: _sift_features
You're close but not interpreting the error quite correctly. This
isn't an error from the compiler or preprocessor, it's a library
error. Assuming this is dynamically linked, your OS is reporting that,
at runtime, it can't find the library that contains _sift_features.
Make sure that it's somewhere where your OS can find it.
More information about the Python-list