I have a python script myscript.py: import pydmy as tp pydmy is my pybind11 wrapper dynamic library. pydmy will load another C++ library libabc.so. libabc.so is under the same directory as pydmy. In windows, everything is fine. In linux, libabc.so: cannot open shared object file: No such file or directory I was told I need to add -Wl,-rpath,$$ORIGIN in makefile of pydmy. But it does not work. Continue reading...