I have a C ++ shared library from my Python program. C ++ lib compiled with HDF5, which I installed using homebrew on OS X, so it is located in /usr/local/lib. Now the problem is that I also installed PyTables, which includes an older version of libhdf5 installed somewhere in/Library/Frameworks/EPD64.framework/Versions/Current/...
I can compile and link my library just fine, but otool -Lreally points to /usr/local/lib/libhdf5.dylib. However, when I try to run it with Python, there is a version mismatch error. Somehow, the run-time linker loads the older hdf5 library.
One way to solve the problem is to create hdf5 as a static library, but I would like to find a more accurate solution - how can I convince the runtime linker to use the new library? I already tried setting DYLD_LIBRARY_PATH, but it just broke everything else (Python and MacVim did not start).
source
share