I'm trying to install and use LibClang's python bindings on Mac OS 10.8, and I've run into a problem with the installed version of the libclang.dylib shared library.
I've built LLVM and clang from source as described on the LLVM website, and I can import the clang.cindex module from a Python script. However, when I try to use any of its' contents, the module throws this error:
clang.cindex.LibclangError: dlsym(0x7f8a314d5f50, clang_CXXMethod_isPureVirtual): symbol not found. Please ensure that your python bindings are compatible with your libclang.so version.
There's an existing version in /usr/lib which I presume was put there by XCode (or required by the system, probably used by dyld), but I guess it's too old to be used with the current bindings. I found another libclang.dylib hidden in a Debug+Asserts folder in the LLVM build directory, but I'm not sure how to force Python to link against it instead of the one in /usr/lib. Is there any way to force the Python libclang bindings to link against a particular version of the libclang dynamic library?