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.
LDFLAGS = -Wl,-rpath,$$ORIGINis not okay. ButLDFLAGS = '-Wl,-rpath,$$ORIGIN'is working. I still do not know why single quote makes such a difference.