Error - dyld: Library not loaded


I’m trying to run an executable on my Mac and I’m getting the following runtime error:

dyld: Library not loaded: libDynamicTTree.dylib
Referenced from: /Users/amruthakrishna/root/summer2_RA/Lab5015Analysis/./bin/analyzeTOFPET2_new.exe
Reason: image not found
Abort trap: 6

I’m a newbie to ROOT and I’m not able to understand what’s going wrong. Any help would be greatly appreciated.

_ROOT Version: 6.18/04
_Platform: macOS 10.14.6


You need to help the executable to find your library, for example by setting the environment variable DYLD_LIBRARY_PATH to include the directory in which libDynamicTTree.dylib is located.