Ok, I found what I need.
I should manually add -Wl,-rpath=/usr/local/lib/NSutils
to fMakeSharedLib
using gSystem->SetMakeSharedLib()
.
So:
- I get the
fMakeSharedLib
withgSystem->GetMakeSharedLib()
- Insert
-Wl,-rpath=/my/path
right before"$LinkedLibs"
- Push it back with
gSystem->SetMakeSharedLib()
- Compiling by
gSystem->CompileMacro(strb, "kfcv-", "ns_lib", "./build/aclic");
Now i can use my ns_lib.so
in “run-time” without adding library path and loading CommonUtils
and FuncUtils
.