Trying to load a shared lib out of the current '.' dir in a unit test on osx.
What works on Linux and Netbsd there is a symlink _mymodule.so --> ../.libs/libmymodule.so
but on osx, python's import mymodule
won't find
_mymodule.dylib --> ../.libs/libmymodule.dylib
I've tried adding
export DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH
to the script env, nogo. Any help appreciated.
-Ed
update 4/6/10:
Solved with the info from krunk below. But just copying or ln -s'ing the dylib to a .so name didn't solve it completely. Still wouldn't load. But telling libtool to link the lib with the -module flag created a .so lib that would load. Python version of the lib works now.
Now if I could just get the perl lib working. I'm building swig perl, python, ruby, and lua libs and this fix only got python and lua working.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…